[seqfan] Re: An interesting sequence

Robert McKone r.p.mckone at gmail.com
Sun Apr 16 15:49:56 CEST 2023


Here is some Mathematica code I wrote to try and solve the problem:

a[n_] := a[n]=Module[{x, squares, avg, seq},
  squares = Range[1, Ceiling[Sqrt[2n]]+1];
  For[x = 1, x <= Length[squares], x++,
   seq = Subsets[squares^2, {x}];
   If[MemberQ[seq, _?(Total[#]/Length[#] == n &)], Return[x]]
  ];
  Return[0]
]

With this code however, I do not believe searching over ‘Sqrt(2n) + 1’
would give different answers, but I am programming this on my mobile and in
bed.  I can confirm my code gets ‘n’ for 2,3,6,8,12 all have no solution so
‘a’ is 0, I also get a(11) and a(76) being 5.

Running this from a(1) to a(1300) I get this tally:
{
    {0, 5},
    {1, 36},
    {2, 365},
    {3, 771},
    {4, 95},
    {5, 28}
}

And the position of the 5’s is:
{{11},{19},{24},{32},{33},{44},{48},{72},{76},{96},{128},{132},{176},{192},{288},{304},{336},{384},{432},{448},{512},{528},{704},{768},{1056},{1152},{1216},{1232}}


The largest 5, a(1232) =5, and 1232 = (1^2 + 9^2 + 37^2 + 47^2 + 50^2)/5

I cannot find any 6 or greater.

But I do need to point out, if you allow for 0 being a perfect square, then
I get some different values, but still nothing 6 or greater.


On Sun, 16 Apr 2023 at 22:26, Fred Lunnon <fred.lunnon at gmail.com> 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:23 AM <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:07 AM 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/
>


More information about the SeqFan mailing list