OFFSET
1,2
COMMENTS
The numbers not of the form 2x^2+3y^2+3z^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 3 raised to an odd power. - V. Raman, Dec 18 2013
Numbers whose squarefree part is congruent to 1 modulo 3. - Peter Munn, May 17 2020
LINKS
Paolo Xausa, 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) = 8n/3 + O(log n). - Charles R Greathouse IV, Dec 19 2013
a(n) = A055041(n)/3. - Peter Munn, May 17 2020
MATHEMATICA
A055047Q[k_] := Mod[k/9^IntegerExponent[k, 9], 3] == 1;
Select[Range[300], A055047Q] (* Paolo Xausa, Mar 20 2025 *)
PROG
(PARI) is(n)=n/=9^valuation(n, 9); n%3==1 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
(Python)
from sympy import integer_log
def A055047(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//9**i-1)//3+1 for i in range(integer_log(x, 9)[0]+1))
return bisection(f, n, n) # Chai Wah Wu, Feb 14 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 01 2000
STATUS
approved
