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 A257999 #16 Jan 31 2025 04:27:43 %S A257999 2,3,8,12,18,27,32,48,72,108,128,162,192,243,288,432,512,648,768,972, %T A257999 1152,1458,1728,2048,2187,2592,3072,3888,4608,5832,6912,8192,8748, %U A257999 10368,12288,13122,15552,18432,19683,23328,27648,32768,34992,41472,49152,52488 %N A257999 Numbers of the form, 2^i*3^j, i+j odd. %H A257999 Reinhard Zumkeller, <a href="/A257999/b257999.txt">Table of n, a(n) for n = 1..10000</a> %F A257999 A069352(a(n)) mod 2 = 1. %F A257999 Sum_{n>=1} 1/a(n) = 5/4. - _Amiram Eldar_, Feb 18 2021 %t A257999 max = 53000; Reap[Do[k = 2^i*3^j; If[k <= max && OddQ[i + j], Sow[k]], {i, 0, Log[2, max] // Ceiling}, {j, 0, Log[3, max] // Ceiling}]][[2, 1]] // Union (* _Amiram Eldar_, Feb 18 2021 after _Jean-François Alcover_ at A036667 *) %o A257999 (Haskell) %o A257999 a257999 n = a257999_list !! (n-1) %o A257999 a257999_list = filter (odd . flip mod 2 . a001222) a003586_list %o A257999 (Python) %o A257999 from sympy import integer_log %o A257999 def A257999(n): %o A257999 def bisection(f,kmin=0,kmax=1): %o A257999 while f(kmax) > kmax: kmax <<= 1 %o A257999 kmin = kmax >> 1 %o A257999 while kmax-kmin > 1: %o A257999 kmid = kmax+kmin>>1 %o A257999 if f(kmid) <= kmid: %o A257999 kmax = kmid %o A257999 else: %o A257999 kmin = kmid %o A257999 return kmax %o A257999 def f(x): return n+x-sum((x//3**i).bit_length()+(i&1)>>1 for i in range(integer_log(x, 3)[0]+1)) %o A257999 return bisection(f,n,n) # _Chai Wah Wu_, Jan 30 2025 %Y A257999 Complement of A036667 with respect to A003586. %Y A257999 Intersection of A026424 and A003586. %Y A257999 Cf. A069352, A022328, A022329. %K A257999 nonn %O A257999 1,1 %A A257999 _Reinhard Zumkeller_, May 16 2015