OFFSET
1,2
COMMENTS
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(4) = 1 since 4 = 4*(1+5*0^2+0^2) + 0^2 with 0 = 0.
a(259) = 1 since 259 = 4^0*(1+5*4^2+13^2) + 3^2 with 4 < 13.
a(333) = 1 since 333 = 4*(1+5*3^2+5^2) + 7^2 with 3 < 5.
a(621) = 1 since 621 = 4*(1+5*0^2+8^2) + 19^2 with 0 < 8.
a(717) = 1 since 717 = 4*(1+5*3^2+11^2) + 7^2 with 3 < 11.
a(1581) = 1 since 1581 = 4*(1+5*1^2+3^2) + 39^2 with 1 < 3.
a(2541) = 1 since 2541 = 4*(1+5*3^2+13^2) + 41^2 with 3 < 13.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-4^k*(1+5x^2+y^2)], r=r+1], {k, 0, Log[4, n]}, {x, 0, Sqrt[(n/4^k-1)/6]}, {y, x, Sqrt[n/4^k-1-5x^2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 04 2016
STATUS
approved