login
A055047
Numbers of the form 9^i*(3*j+1).
15
1, 4, 7, 9, 10, 13, 16, 19, 22, 25, 28, 31, 34, 36, 37, 40, 43, 46, 49, 52, 55, 58, 61, 63, 64, 67, 70, 73, 76, 79, 81, 82, 85, 88, 90, 91, 94, 97, 100, 103, 106, 109, 112, 115, 117, 118, 121, 124, 127, 130, 133, 136, 139, 142, 144, 145, 148, 151, 154, 157, 160, 163
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
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
Intersection of A007417 and A189715.
Complement of A055048 with respect to A007417.
Complement of A055040 with respect to A189715.
Sequence in context: A010389 A010415 A010442 * A234429 A391356 A291201
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 01 2000
STATUS
approved