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 A317804 #63 Apr 22 2025 05:08:42 %S A317804 1,2,4,8,12,16,24,32,48,64,96,128,144,192,256,288,384,512,576,768, %T A317804 1024,1152,1536,1728,2048,2304,3072,3456,4096,4608,6144,6912,8192, %U A317804 9216,12288,13824,16384,18432,20736,24576,27648,32768,36864,41472,49152,55296,65536 %N A317804 Numbers of form 2^i*12^j, with i, j >= 0. %H A317804 Dario Ch, <a href="/A317804/b317804.txt">Table of n, a(n) for n = 1..10000</a> %F A317804 Sum_{n>=1} 1/a(n) = 24/11. - _Amiram Eldar_, Mar 29 2025 %t A317804 With[{max = 10^5}, Flatten[Table[2^i*12^j, {i, 0, Log2[max]}, {j, 0, Log[12, max/2^i]}]] // Sort] (* _Amiram Eldar_, Mar 29 2025 *) %o A317804 (Python) %o A317804 from heapq import heappush, heappop %o A317804 def sequence(): %o A317804 pq = [1] %o A317804 seen = set(pq) %o A317804 while True: %o A317804 value = heappop(pq) %o A317804 yield value %o A317804 seen.remove(value) %o A317804 for x in 2 * value, 12 * value: %o A317804 if x not in seen: %o A317804 heappush(pq, x) %o A317804 seen.add(x) %o A317804 seq = sequence() %o A317804 finalsequence_list = [next(seq) for i in range(100)] # _Dario Ch_, Sep 01 2018 %o A317804 (Python) %o A317804 from sympy import integer_log %o A317804 def A317804(n): %o A317804 def bisection(f,kmin=0,kmax=1): %o A317804 while f(kmax) > kmax: kmax <<= 1 %o A317804 kmin = kmax >> 1 %o A317804 while kmax-kmin > 1: %o A317804 kmid = kmax+kmin>>1 %o A317804 if f(kmid) <= kmid: %o A317804 kmax = kmid %o A317804 else: %o A317804 kmin = kmid %o A317804 return kmax %o A317804 def f(x): return n+x-sum((x//12**i).bit_length() for i in range(integer_log(x,12)[0]+1)) %o A317804 return bisection(f,n,n) # _Chai Wah Wu_, Mar 26 2025 %Y A317804 Cf. A025612, A003596, A107326, A003597, A107364, A025616, A108201, A108238. %K A317804 nonn,easy %O A317804 1,2 %A A317804 _Dario Ch_, Sep 01 2018