OFFSET
1,1
COMMENTS
Numbers not of the form x^2+y^2+5z^2.
Also values of n such that numbers of the form x^2+n*y^2 for some integers x, y cannot have prime factor of 2 raised to an odd power. - V. Raman, Dec 18 2013
LINKS
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) = 6n + O(log n). - Charles R Greathouse IV, Dec 19 2013
PROG
(PARI) is(n)=n/=4^valuation(n, 4); n%8==3 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
(Python)
from itertools import count, islice
def A055046_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:not (m:=(~n&n-1).bit_length())&1 and (n>>m)&7==3, count(max(startvalue, 1)))
(Python)
def A055046(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))-3>>3)+1 for i in range(x.bit_length()>>1))
return bisection(f, n, n) # Chai Wah Wu, Feb 14 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 01 2000
STATUS
approved