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 A108906 #20 Oct 01 2024 14:34:32 %S A108906 1,1,1,4,1,7,11,5,32,17,47,115,13,256,217,295,1024,139,1909,2465,1631, %T A108906 8192,3299,13085,26281,6487,65536,46075,84997,262144,7153,517135, %U A108906 545747,502829,2097152,588665,3605639,5960299,2428309,16777216,9492289 %N A108906 First differences of A006899. %C A108906 In the 14th century Levi Ben Gerson proved that this sequence contains only four 1s; see A235365, A235366, A236210. - _Jonathan Sondow_, Jan 20 2014 %H A108906 Reinhard Zumkeller, <a href="/A108906/b108906.txt">Table of n, a(n) for n = 1..1000</a> %p A108906 A:={seq(2^n,n=0..63)}: B:={seq(3^n,n=0..40)}: C:=sort(convert(A union B,list)): seq(C[j]-C[j-1],j=2..44); # _Emeric Deutsch_, Aug 03 2005 %t A108906 nn = 10^20; t = Union[ 2^Range[0, Floor[Log[2, nn]]], 3^Range[0, Floor[Log[3, nn]]]]; Differences@ t (* _Robert G. Wilson v_, May 26 2014 *) %o A108906 (Haskell) %o A108906 a108906 n = a108906_list !! (n-1) %o A108906 a108906_list = zipWith (-) (tail a006899_list) a006899_list %o A108906 -- _Reinhard Zumkeller_, Oct 09 2013 %o A108906 (Python) %o A108906 from sympy import integer_log %o A108906 def A108906(n): %o A108906 m, m2 = 3**(n-1), 1<<n %o A108906 k, k2, k3 = integer_log(m,6)[0], integer_log(3*m,6)[0], integer_log(9*m,6)[0] %o A108906 return (1<<k2 if k2<k3 else 3**integer_log(m2<<1,6)[0]-(1<<k2)) if k<k2 else ((1<<k3)-3**integer_log(m2,6)[0] if k2<k3 else 3**integer_log(m2<<1,6)[0]-3**integer_log(m2,6)[0]) # _Chai Wah Wu_, Oct 01 2024 %Y A108906 Cf. A006899. %Y A108906 Cf. also A235365, A235366, A236210. %K A108906 easy,nonn %O A108906 1,4 %A A108906 Ali A. Tanara (tanara(AT)khayam.ut.ac.ir), Jul 17 2005 %E A108906 More terms from _Emeric Deutsch_, Aug 03 2005