OFFSET
0,13
COMMENTS
Conjecture: (i) If n is not divisible by 3, then a(n) > 0 except for n = 1, 2, 10, 26, 31, 34, 47, 59, 166, 278, 451.
(ii) Any integer n > 14986 not divisible by 3 can be written as 3(3x)^2 + y^2 + z^2 with x,y,z integers.
Note that a(3*n)>0 if and only if n = x^2 + 3*y^2 + 3*z^2 for some integers x,y,z with gcd(3,x) = 1. It is known that the only natural numbers not represented by x^2 + 3*y^2 + 3*z^2 have the form 9^k*(3*m+2) with k >= 0 and m >= 0.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, A result similar to Lagrange's theorem, arXiv:1503.03743 [math.NT], 2015.
EXAMPLE
a(11) = 1 since 11 = 3*1^2 + 2^2 + 2^2 with gcd(1,3) = 1.
a(22) = 1 since 22 = 3*2^2 + 1^2 + 3^2 with gcd(2,3) = 1.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[Mod[x, 3]>0&&SQ[n-3x^2-y^2], r=r+1], {x, 0, Sqrt[n/3]}, {y, 0, Sqrt[(n-3x^2)/2]}];
Print[n, " ", r]; Label[aa]; Continue, {n, 0, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 23 2015
STATUS
approved