login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063954 Every number is the sum of 4 squares; these are the odd numbers such that the first square can be taken to be any square < n. 5

%I #21 Jan 03 2019 13:28:24

%S 1,3,5,9,13,17,21,25,33,41,45,49,57,65,73,81,89,97,105,129,145,153,

%T 169,177,185,201,209,217,225,257,273,297,305,313,329,345,353,385,425,

%U 433,441,481,513,561,585,609,689,697,713,817,825,945

%N Every number is the sum of 4 squares; these are the odd numbers such that the first square can be taken to be any square < n.

%C This sequence is finite, with 52 terms.

%C This is a variant of A063951 where the arbitrary first squares must be positive. This makes a difference only for n = 7 and n = 15, which are in A063951 but not in this sequence, because for these two n and k = 0, n - k^2 is in A004215, i.e., not the sum of fewer than 4 squares. - _M. F. Hasler_, Jan 27 2018

%D J. H. Conway, personal communication, Aug 27, 2001.

%H Gordon Pall, <a href="https://doi.org/10.1090/S0002-9947-1932-1501631-X">On Sums of Two or Four Values of a Quadratic Function of x</a>, Transactions of the American Mathematical Society, Vol. 34, No. 1, (January 1932), pp. 98-125. - _Ant King_, Nov 01 2010

%t j[k_] := If[Union[Flatten[PowersRepresentations[k,4,2]]^2] == (#^2&/@Range[0,Sqrt[k]]), True, False]; Select[Range[1,1250,2], j] [From Ant King, Nov 01 2010]

%o (PARI) is_A063954(n)=bittest(n, 0)&&!forstep(k=sqrtint(n-1), 0, -1, isA004215(n-k^2)&&return) \\ _M. F. Hasler_, Jan 27 2018

%Y Cf. A063949, A063950, A063951, A063952, A063953.

%K nonn,easy,nice,fini,full

%O 1,2

%A _N. J. A. Sloane_, Sep 04 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)