OFFSET
1,3
COMMENTS
Numbers represented by quadratic form with Gram matrix [ 1, 0, 0; 0, 1, 0; 0, 0, 2 ].
These are the numbers not of the form 4^k*(16*m + 14). [Dickson] - Everett W. Howe, May 18 2008
The asymptotic density of this sequence is 11/12. - Amiram Eldar, Mar 29 2025
REFERENCES
Wacław Sierpiński, Elementary Theory of Numbers, (Ed. A. Schinzel), North-Holland, 1988, see Exercise 4 on p. 395.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
L. E. Dickson, Integers represented by positive ternary quadratic forms, Bull. Amer. Math. Soc. 33 (1927), 63-70.
Gabriele Nebe and N. J. A. Sloane, Home page for this lattice.
FORMULA
a(n) = 12n/11 + O(log n). - Charles R Greathouse IV, Jan 24 2026
MAPLE
L := [seq(0, i=1..1)]: for x from 0 to 20 do for y from 0 to 20 do for z from 0 to 20 do if member(x^2+y^2+2*z^2, L)=false then L := [op(L), x^2+y^2+2*z^2] fi: od: od: od: L2 := sort(L): for i from 1 to 100 do printf(`%d, `, L2[i]) od:
MATHEMATICA
q=16; imax=q^2; Select[Union[Flatten[Table[x^2+y^2+2*z^2, {z, 0, q}, {y, 0, q}, {x, 0, q}]]], #<=imax&] (* Vladimir Joseph Stephan Orlovsky, Apr 19 2011 *)
Select[Range[0, 100], Mod[# / 4^IntegerExponent[#, 4], 16] != 14 &] (* Amiram Eldar, Mar 29 2025 *)
PROG
(Python)
def A000401(n):
def f(x): return n-1+sum(((x>>i)-7>>3)+1 for i in range(1, x.bit_length(), 2))
m, k = n-1, f(n-1)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Feb 24 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from James Sellers, May 31 2000
STATUS
approved
