OFFSET
1,2
COMMENTS
Part (i) of the conjecture in A279612 implies that any positive integer can be written as the sum of a square and a term of the current sequence.
It seems that a(n)/n has the limit 2 as n tends to the infinity.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
EXAMPLE
a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 + 2*0 - 2*0 = 4^0.
a(2) = 3 since 3 = 1^2 + 1^2 + 1^2 + 0^2 with 1 + 2*1 - 2*1 = 4^0.
a(4) = 5 since 5 = 2^2 + 1^2 + 0^2 + 0^2 with 2 + 2*1 - 2*0 = 4.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
FP[n_]:=FP[n]=n>0&&IntegerQ[Log[4, n]];
ex={}; Do[Do[If[SQ[m-x^2-y^2]&&FP[x+2y-2*Sqrt[m-x^2-y^2]], ex=Append[ex, m]; Goto[aa]], {x, 0, Sqrt[m]}, {y, 0, Sqrt[m-x^2]}]; Label[aa]; Continue, {m, 1, 144}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Dec 15 2016
STATUS
approved