This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A055048 #46 Feb 14 2025 17:30:18 %S A055048 2,5,8,11,14,17,18,20,23,26,29,32,35,38,41,44,45,47,50,53,56,59,62,65, %T A055048 68,71,72,74,77,80,83,86,89,92,95,98,99,101,104,107,110,113,116,119, %U A055048 122,125,126,128,131,134,137,140,143,146,149,152,153,155 %N A055048 Numbers of the form 9^i*(3*j+2). %C A055048 The numbers not of the form x^2+3y^2+3z^2. %C A055048 Numbers whose squarefree part is congruent to 2 modulo 3. - _Peter Munn_, May 17 2020 %C A055048 The asymptotic density of this sequence is 3/8. - _Amiram Eldar_, Mar 08 2021 %H A055048 Reinhard Zumkeller, <a href="/A055048/b055048.txt">Table of n, a(n) for n = 1..10000</a> %H A055048 L. J. Mordell, <a href="https://doi.org/10.1093/qmath/os-1.1.276">A new Waring's problem with squares of linear forms</a>, Quart. J. Math., 1 (1930), 276-288 (see p. 283). %F A055048 a(n) = A055040(n)/3. - _Peter Munn_, May 17 2020 %t A055048 max = 200; Select[ Union[ Flatten[ Table[ 9^i*(3*j + 2), {i, 0, Ceiling[Log[max]/Log[9]]}, {j, 0, Ceiling[( max/9^i - 2)/3]}]]], # <= max &] (* _Jean-François Alcover_, Oct 13 2011 *) %o A055048 (Haskell) %o A055048 a055048 n = a055048_list !! (n-1) %o A055048 a055048_list = filter (s 0) [1..] where %o A055048 s t u | m > 0 = even t && m == 2 %o A055048 | m == 0 = s (t + 1) u' where (u',m) = divMod u 3 %o A055048 -- _Reinhard Zumkeller_, Apr 07 2012 %o A055048 (PARI) is(n)=n/=9^valuation(n, 9); n%3==2 \\ _Charles R Greathouse IV_ and _V. Raman_, Dec 19 2013 %o A055048 (Python) %o A055048 from sympy import integer_log %o A055048 def A055048(n): %o A055048 def bisection(f,kmin=0,kmax=1): %o A055048 while f(kmax) > kmax: kmax <<= 1 %o A055048 kmin = kmax >> 1 %o A055048 while kmax-kmin > 1: %o A055048 kmid = kmax+kmin>>1 %o A055048 if f(kmid) <= kmid: %o A055048 kmax = kmid %o A055048 else: %o A055048 kmin = kmid %o A055048 return kmax %o A055048 def f(x): return n+x-sum((x//9**i-2)//3+1 for i in range(integer_log(x,9)[0]+1)) %o A055048 return bisection(f,n,n) # _Chai Wah Wu_, Feb 14 2025 %Y A055048 Intersection of A007417 and A189716. %Y A055048 Complement of A055047 with respect to A007417. %Y A055048 Complement of A055041 with respect to A189716. %Y A055048 Cf. A007913, A055040. %K A055048 nonn %O A055048 1,1 %A A055048 _N. J. A. Sloane_, Jun 01 2000