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 A055041 #23 Feb 14 2025 17:26:29 %S A055041 3,12,21,27,30,39,48,57,66,75,84,93,102,108,111,120,129,138,147,156, %T A055041 165,174,183,189,192,201,210,219,228,237,243,246,255,264,270,273,282, %U A055041 291,300,309,318,327,336,345,351,354,363,372,381,390,399 %N A055041 Numbers of the form 3^(2i+1)*(3*j+1). %C A055041 The numbers not of the form x^2+y^2+6z^2. %C A055041 Numbers whose squarefree part is congruent to 3 modulo 9. Compare with A329575. - _Peter Munn_, May 17 2020 %C A055041 The asymptotic density of this sequence is 1/8. - _Amiram Eldar_, Mar 08 2021 %H A055041 Amiram Eldar, <a href="/A055041/b055041.txt">Table of n, a(n) for n = 1..10000</a> %H A055041 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 A055041 a(n) = A055047(n) * 3. - _Peter Munn_, May 17 2020 %t A055041 f[p_, e_] := (p^Mod[e, 2]); sqfpart[n_] := Times @@ f @@@ FactorInteger[n]; Select[Range[400], Mod[sqfpart[#], 9] == 3 &] (* _Amiram Eldar_, Mar 08 2021 *) %o A055041 (Python) %o A055041 from sympy import integer_log %o A055041 def A055041(n): %o A055041 def bisection(f,kmin=0,kmax=1): %o A055041 while f(kmax) > kmax: kmax <<= 1 %o A055041 kmin = kmax >> 1 %o A055041 while kmax-kmin > 1: %o A055041 kmid = kmax+kmin>>1 %o A055041 if f(kmid) <= kmid: %o A055041 kmax = kmid %o A055041 else: %o A055041 kmin = kmid %o A055041 return kmax %o A055041 def f(x): return n+x-sum((x//9**i-1)//3+1 for i in range(integer_log(x,9)[0]+1)) %o A055041 return bisection(f,n,n)*3 # _Chai Wah Wu_, Feb 14 2025 %Y A055041 Intersection of A145204 and A189716. %Y A055041 Complement of A055040 with respect to A145204\{0}. %Y A055041 Complement of A055048 with respect to A189716. %Y A055041 Cf. A007913, A055047, A329575. %K A055041 nonn %O A055041 1,1 %A A055041 _N. J. A. Sloane_, Jun 01 2000