OFFSET
1,2
COMMENTS
This sequence is finite, with 52 terms.
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
REFERENCES
J. H. Conway, personal communication, Aug 27, 2001.
LINKS
Gordon Pall, On Sums of Two or Four Values of a Quadratic Function of x, Transactions of the American Mathematical Society, Vol. 34, No. 1, (January 1932), pp. 98-125. - Ant King, Nov 01 2010
MATHEMATICA
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]
PROG
(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
CROSSREFS
KEYWORD
nonn,easy,nice,fini,full
AUTHOR
N. J. A. Sloane, Sep 04 2001
STATUS
approved