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 A003596 #60 Apr 21 2025 08:37:08 %S A003596 1,2,4,8,11,16,22,32,44,64,88,121,128,176,242,256,352,484,512,704,968, %T A003596 1024,1331,1408,1936,2048,2662,2816,3872,4096,5324,5632,7744,8192, %U A003596 10648,11264,14641,15488,16384,21296,22528,29282,30976,32768 %N A003596 Numbers of the form 2^i * 11^j. %C A003596 A204455(11*a(n)) = 11, and only for these numbers. - _Wolfdieter Lang_, Feb 04 2012 %H A003596 Charles R Greathouse IV, <a href="/A003596/b003596.txt">Table of n, a(n) for n = 1..10000</a> (first 100 terms from Vincenzo Librandi) %F A003596 The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(22*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - _Peter Bala_, Mar 18 2019 %F A003596 Sum_{n>=1} 1/a(n) = (2*11)/((2-1)*(11-1)) = 11/5. - _Amiram Eldar_, Sep 23 2020 %F A003596 a(n) ~ exp(sqrt(2*log(2)*log(11)*n)) / sqrt(22). - _Vaclav Kotesovec_, Sep 23 2020 %t A003596 fQ[n_] := PowerMod[22,n,n]==0; Select[Range[40000], fQ] (* _Vincenzo Librandi_, Feb 04 2012 *) %o A003596 (PARI) list(lim)=my(v=List(),N);for(n=0,log(lim)\log(11),N=11^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jun 28 2011 %o A003596 (Haskell) %o A003596 import Data.Set (singleton, deleteFindMin, insert) %o A003596 a003596 n = a003596_list !! (n-1) %o A003596 a003596_list = f $ singleton (1,0,0) where %o A003596 f s = y : f (insert (2 * y, i + 1, j) $ insert (11 * y, i, j + 1) s') %o A003596 where ((y, i, j), s') = deleteFindMin s %o A003596 -- _Reinhard Zumkeller_, May 15 2015 %o A003596 (Magma) [n: n in [1..2*10^5] | PrimeDivisors(n) subset [2, 11]]; // _Vincenzo Librandi_, Jun 27 2016 %o A003596 (GAP) Filtered([1..33000],n->PowerMod(22,n,n)=0); # _Muniru A Asiru_, Mar 19 2019 %o A003596 (Python) %o A003596 from sympy import integer_log %o A003596 def A003596(n): %o A003596 def bisection(f,kmin=0,kmax=1): %o A003596 while f(kmax) > kmax: kmax <<= 1 %o A003596 kmin = kmax >> 1 %o A003596 while kmax-kmin > 1: %o A003596 kmid = kmax+kmin>>1 %o A003596 if f(kmid) <= kmid: %o A003596 kmax = kmid %o A003596 else: %o A003596 kmin = kmid %o A003596 return kmax %o A003596 def f(x): return n+x-sum((x//11**i).bit_length() for i in range(integer_log(x,11)[0]+1)) %o A003596 return bisection(f,n,n) # _Chai Wah Wu_, Mar 25 2025 %Y A003596 Cf. A025612, A025616, A025621, A025625, A025629, A025632, A025634, A025635, A108761, A003597, A107988, A003598, A108698, A003599, A107788, A108687, A108779, A108090. %K A003596 nonn,easy %O A003596 1,2 %A A003596 _N. J. A. Sloane_