OFFSET
1,1
COMMENTS
These are also the numbers not of the form x^2+2y^2+3z^2.
The asymptotic density of this sequence is 1/12. - Amiram Eldar, Mar 29 2025
REFERENCES
Burton W. Jones, The Arithmetic of Quadratic Forms, Carus Monograph 10, Math. Assoc. America, 1967; Problem 60, p. 204.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
L. J. Mordell, A new Waring's problem with squares of linear forms, Quart. J. Math., 1 (1930), 276-288 (see p. 283).
FORMULA
a(n) = 2*A055045(n). - Chai Wah Wu, Mar 19 2025
EXAMPLE
42 = 21*2 = 2^(2*0 + 1)*(8*2 + 5) is in the sequence. - David A. Corneth, Apr 18 2021
MATHEMATICA
With[{max = 700}, Flatten[Table[2^(2*i + 1)*(8*j + 5), {i, 0, (Log2[max] - 1)/2}, {j, 0, Floor[(max/2^(2*i + 1) - 5)/8]}]] // Sort] (* Amiram Eldar, Mar 29 2025 *)
PROG
(PARI) upto(n) = { my(res = List()); for(i = 0, logint(n\2, 2), forstep(j = 5, n>>(2*i+1), 8, listput(res, 4^i*2*j) ) ); Set(res) } \\ David A. Corneth, Apr 18 2021
(Python)
def A055042(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(((x>>(i<<1)+1)-5>>3)+1 for i in range(x.bit_length()-1>>1))
return bisection(f, n, n) # Chai Wah Wu, Mar 19 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 01 2000
STATUS
approved
