cp's OEIS Frontend

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.

A108687 Numbers of the form (9^i)*(11^j), with i, j >= 0.

This page as a plain text file.
%I A108687 #27 Apr 22 2025 03:59:49
%S A108687 1,9,11,81,99,121,729,891,1089,1331,6561,8019,9801,11979,14641,59049,
%T A108687 72171,88209,107811,131769,161051,531441,649539,793881,970299,1185921,
%U A108687 1449459,1771561,4782969,5845851,7144929,8732691,10673289,13045131
%N A108687 Numbers of the form (9^i)*(11^j), with i, j >= 0.
%H A108687 Reinhard Zumkeller, <a href="/A108687/b108687.txt">Table of n, a(n) for n = 1..10000</a>
%F A108687 Sum_{n>=1} 1/a(n) = (9*11)/((9-1)*(11-1)) = 99/80. - _Amiram Eldar_, Sep 24 2020
%F A108687 a(n) ~ exp(sqrt(2*log(9)*log(11)*n)) / sqrt(99). - _Vaclav Kotesovec_, Sep 24 2020
%t A108687 f[upto_]:=With[{max9=Floor[Log[9,upto]],max11=Floor[Log[11,upto]]}, Select[Union[Times@@{9^First[#],11^Last[#]}&/@Tuples[{Range[0, max9], Range[0, max11]}]], #<=upto&]]; f[14000000]  (* _Harvey P. Dale_, Mar 11 2011 *)
%o A108687 (Haskell)
%o A108687 import Data.Set (singleton, deleteFindMin, insert)
%o A108687 a108687 n = a108687_list !! (n-1)
%o A108687 a108687_list = f $ singleton (1,0,0) where
%o A108687    f s = y : f (insert (9 * y, i + 1, j) $ insert (11 * y, i, j + 1) s')
%o A108687          where ((y, i, j), s') = deleteFindMin s
%o A108687 -- _Reinhard Zumkeller_, May 15 2015
%o A108687 (Python)
%o A108687 from sympy import integer_log
%o A108687 def A108687(n):
%o A108687     def bisection(f,kmin=0,kmax=1):
%o A108687         while f(kmax) > kmax: kmax <<= 1
%o A108687         kmin = kmax >> 1
%o A108687         while kmax-kmin > 1:
%o A108687             kmid = kmax+kmin>>1
%o A108687             if f(kmid) <= kmid:
%o A108687                 kmax = kmid
%o A108687             else:
%o A108687                 kmin = kmid
%o A108687         return kmax
%o A108687     def f(x): return n+x-sum(integer_log(x//11**i,9)[0]+1 for i in range(integer_log(x,11)[0]+1))
%o A108687     return bisection(f,n,n) # _Chai Wah Wu_, Mar 25 2025
%Y A108687 Subsequence of A003597.
%Y A108687 Cf. A025633, A025634, A107788, A107764, A003596, A107988, A003598, A003599, A108090.
%K A108687 nonn,easy
%O A108687 1,2
%A A108687 Douglas Winston (douglas.winston(AT)srupc.com), Jun 17 2005