[seqfan] Re: An interesting sequence

jens at voss-ahrensburg.de jens at voss-ahrensburg.de
Sun Apr 16 21:58:43 CEST 2023


By the way, it is easy to see that { n | a(n) = 1 } is just the set of 
squares (https://oeis.org/A000290) and that
{ n | a(n) = 2 } is equal to the set of non-squares that are the sum of 
two distinct squares (https://oeis.org/A132777).

Classifying { n | a(n) = 3 } appears to be much more difficult.

Regards
Jens


Am 2023-04-16 16:08, schrieb israel at math.ubc.ca:
> It's worth noting that the average of x distinct nonzero squares
>> = (x+1)*(2*x+1)/6, so x <= (sqrt(1+48*n)-1)/4.
> Here's my Maple program:
> 
> T:= proc(x,m) # sums of x distinct squares in {1^2, ..., m^2}
> option remember;
> if x = 0 then return {0} elif m < x then return {}
> fi;
> procname(x,m-1) union map(`+`,procname(x-1,m-1),m^2)
> end proc:
> 
> f:= proc(n) local S,X,t,x,xmax, tmax;
> xmax:= floor((sqrt(1+48*n)-1)/4);
> for x from 1 to xmax do
>  tmax:= floor(sqrt(x*n));
>  if member(n*x, T(x,tmax)) then return x fi
> od;
> 0
> end proc:
> 
> Here are the first 200 terms:
> 
> 1, 0, 0, 1, 2, 0, 3, 0, 1, 2, 5, 0, 2, 3, 3, 1, 2, 3, 5, 2, 4, 3, 3,
> 5, 1, 2, 3, 3, 2, 3, 3, 5, 5, 2, 3, 1, 2, 3, 3, 2, 2, 3, 3, 5, 2, 3,
> 3, 5, 1, 2, 3, 2, 2, 3, 3, 3, 3, 2, 4, 3, 2, 3, 3, 1, 2, 3, 3, 2, 4,
> 3, 3, 3, 2, 2, 3, 5, 4, 3, 3, 2, 1, 2, 3, 4, 2, 3, 3, 3, 2, 2, 3, 3,
> 4, 3, 3, 5, 2, 3, 3, 1, 2, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3,
> 2, 2, 3, 3, 3, 1, 2, 3, 3, 2, 3, 3, 5, 3, 2, 3, 5, 4, 3, 3, 2, 2, 3,
> 3, 3, 4, 3, 3, 1, 2, 2, 3, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3,
> 3, 3, 2, 4, 3, 3, 3, 1, 2, 3, 3, 2, 3, 3, 5, 3, 2, 3, 2, 2, 3, 3, 3,
> 2, 3, 3, 3, 4, 3, 3, 5, 2, 2, 3, 1, 2, 3, 3, 2
> 
> Cheers,
> Robert
> 
> On Apr 16 2023, Fred Lunnon wrote:
> 
>> Ouch --- thanks.
>> Now that blunder is fixed, my brute-force Magma lash-up finds
>> 
>>    x = 5  for  n  in  {5, 19, 24, 32, 33, 44, 48, 76} ;
>> 
>>    76 = ( 3^2 + 5^2 + 9^2 + 11^2 + 12^2 )/5 .
>> 
>> No further zeros up to next standout case at  n = 96 .
>> 
>> WFL
>> 
>> 
>> On Sun, Apr 16, 2023 at 11:23AM <jens at voss-ahrensburg.de> wrote:
>> 
>>> 
>>> a(11) = 5 since 11 = (25 + 16 + 9 + 4 + 1) / 5.
>>> 
>>> Am 2023-04-16 12:07, schrieb Fred Lunnon:
>>> > << only a(2), a(3), a(6), a(8), a(12) are 0 >>
>>> >
>>> > What about  n = 11  ?!     WFL
>>> >
>>> >
>>> >
>>> > On Sun, Apr 16, 2023 at 6:07AM Yifan Xie <xieyifan4013 at 163.com> wrote:
>>> >
>>> >> Hi,
>>> >> a(n) is the smallest positive integer x such that n can be expressed
>>> >> as
>>> >> the arithmetic mean of x distinct nonzero squares, or 0 if x does not
>>> >> exist. Based on my calculation of a(1) to a(76) by hand, only a(2),
>>> >> a(3),
>>> >> a(6), a(8), a(12) are 0 and no terms are larger than 5.
>>> >> Please consider this sequence, and if possible, provide a program for
>>> >> me.
>>> >>
>>> >> Best regards,
>>> >> Yifan Xie (xieyifan4013 at 163.com)
>>> 
>>> 
>>> --
>>> Seqfan Mailing list - http://list.seqfan.eu/
>>> 
>> 
>> --
>> Seqfan Mailing list - http://list.seqfan.eu/
>> 
>> 
> 
> --
> Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list