Greedy decomposition into squares

29 views
Skip to first unread message

Allan Wechsler

unread,
Aug 25, 2025, 5:54:19 PM (13 days ago) Aug 25
to SeqFan
I remembered that OEIS had https://oeis.org/A053610 , but I didn't remember the sequence number or the crucial keywords, so I just started typing terms. I thought to myself, "Well, 0 requires 0 squares by the usual interpretation", so my search entries started with a 0. I got to the point where the only remaining hit was https://oeis.org/A002828 (at n = 9) and I became confused. I continued to n = 12, and sure enough there were no hits.

So of course I dropped the leading zero, and there was the desired sequence.

I wonder how many users have been confused by this? What possible rationale is there for leaving the leading 0 off? I don't mean this question rhetorically -- there may well be a good reason which just isn't occurring to me at the moment. Tom Ordo added a comment to this effect to the sequence in 2014, but we didn't change it then.

-- Allan

Neil Sloane

unread,
Aug 25, 2025, 6:19:23 PM (13 days ago) Aug 25
to seq...@googlegroups.com
1.  I agree that we could add an initial a(0)=0 to A053610 - Sean, do you agree?

2.  Remember the first rule in using the OEIS: always leave off the first term or two when looking up a sequence (that is at the top of the Hints link).  And that has been plastered over every sequence page since it started.  Users who forget that get punished and  just cause trouble!

3.  There is a special category of "arithmetic" sequences - like the sum-of-divisors function, and many others, that have offset 1, because they just don't make sense for n = 0. What is the zeroth prime?  1 obviously, so the primes have offset 1. 
Best regards
Neil 

Neil J. A. Sloane, Chairman, OEIS Foundation.
Also Visiting Scientist, Math. Dept., Rutgers University, 



--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CADy-sGEW5naDET5YA5bo%3Dmd2izFNkbLEwFVj2-_0CpPAA4ZPqA%40mail.gmail.com.

Sean A. Irvine

unread,
Aug 25, 2025, 6:23:04 PM (13 days ago) Aug 25
to seq...@googlegroups.com
No objection, as long as whoever does it checks the consequences.

Sean.


Allan Wechsler

unread,
Aug 25, 2025, 6:35:25 PM (13 days ago) Aug 25
to seq...@googlegroups.com
If someone gives me hints on the consequences to look out for, I'm willing to try.

With regard to Neil's comment on the primes, I thought it had long been canonical that sequences whose primary interpretation is "Numbers n such that P(n)" for some predicate P, should be marked "list" and indexed from 1. The primes are an example. We follow this guideline even when A(1) = 0, which sometimes leads to awkwardness when a formula would be simpler if we had chosen 0-origin indexing. We don't do this slavishly, though: for example, the triangular numbers are 0-origin, as they should be, with the cost that they are not marked "list".

Geoffrey Caveney

unread,
Aug 25, 2025, 7:27:19 PM (13 days ago) Aug 25
to seq...@googlegroups.com
I don’t have a strong opinion on this question either way, but I observe that the sequence is defined as “Number of positive squares needed to sum to n….” So my question would be, what is the mathematical meaning or significance of the statement that “It requires 0 positive squares to sum to 0”? If there is a valid mathematical answer, I have no objection.


On Mon, Aug 25, 2025 at 5:54 PM Allan Wechsler <acw...@gmail.com> wrote:

David desJardins

unread,
Aug 25, 2025, 7:35:29 PM (12 days ago) Aug 25
to seq...@googlegroups.com
On Mon, Aug 25, 2025 at 7:27 PM Geoffrey Caveney <geoffre...@gmail.com> wrote:
I don’t have a strong opinion on this question either way, but I observe that the sequence is defined as “Number of positive squares needed to sum to n….” So my question would be, what is the mathematical meaning or significance of the statement that “It requires 0 positive squares to sum to 0”? If there is a valid mathematical answer, I have no objection.

If you add up all of the elements in the set {}, the total is 0.

Pontus von Brömssen

unread,
Aug 30, 2025, 11:08:45 AM (8 days ago) Aug 30
to seq...@googlegroups.com
One thing that is good to do when making this kind of change, is to check crossreferenced sequences, and sequences with crossreferences to the sequence in consideration. (Click "refs" in the bar below the data.) For example, there might be an array that says "Axxxxxx is the y-th row", which may not remain completely true after a term has been prepended.

/Pontus

Reply all
Reply to author
Forward
0 new messages