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!)
A257109 Number of ways to write n = 3*x^2 + y^2 + z^2, where x,y,z are nonnegative integers with gcd(3,x) = 1 and y <= z. 1
0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 2, 2, 1, 0, 2, 1, 0, 1, 2, 2, 1, 1, 0, 1, 0, 0, 3, 2, 1, 0, 2, 0, 0, 1, 0, 3, 1, 1, 1, 1, 0, 1, 2, 0, 1, 0, 3, 2, 1, 0, 3, 4, 0, 1, 2, 2, 1, 0, 0, 3, 2, 0, 3, 2, 1, 1, 3, 0, 1, 1, 0, 3, 1, 2, 3, 5, 0, 1, 3, 0, 1, 2, 4, 4, 1, 0, 4, 1, 0, 1, 3, 4, 1, 1, 0, 3, 2, 0, 4 (list; graph; refs; listen; history; text; internal format)
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, 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
Cf. A000290.
Sequence in context: A194853 A309866 A287150 * A096830 A319780 A141647
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 23 2015
STATUS
approved

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 April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)