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.

A036667 Numbers of the form 2^i*3^j, i+j even.

This page as a plain text file.
%I A036667 #28 Jan 31 2025 03:31:55
%S A036667 1,4,6,9,16,24,36,54,64,81,96,144,216,256,324,384,486,576,729,864,
%T A036667 1024,1296,1536,1944,2304,2916,3456,4096,4374,5184,6144,6561,7776,
%U A036667 9216,11664,13824,16384,17496,20736,24576,26244,31104,36864,39366
%N A036667 Numbers of the form 2^i*3^j, i+j even.
%H A036667 Reinhard Zumkeller, <a href="/A036667/b036667.txt">Table of n, a(n) for n = 1..10000</a>
%F A036667 A069352(a(n)) mod 2 = 0. - _Reinhard Zumkeller_, May 16 2015
%F A036667 Sum_{n>=1} 1/a(n) = 7/4. - _Amiram Eldar_, Feb 18 2021
%t A036667 max = 40000;
%t A036667 Reap[Do[k = 2^i 3^j; If[k <= max && EvenQ[i+j], Sow[k]], {i, 0, Log[2, max] // Ceiling}, {j, 0, Log[3, max] // Ceiling}]][[2, 1]] // Union (* _Jean-François Alcover_, Aug 04 2018 *)
%o A036667 (Haskell)
%o A036667 a036667 n = a036667_list !! (n-1)
%o A036667 a036667_list = filter (even . flip mod 2 . a001222) a003586_list
%o A036667 -- _Reinhard Zumkeller_, May 16 2015
%o A036667 (Python)
%o A036667 from sympy import integer_log
%o A036667 def A036667(n):
%o A036667     def bisection(f,kmin=0,kmax=1):
%o A036667         while f(kmax) > kmax: kmax <<= 1
%o A036667         kmin = kmax >> 1
%o A036667         while kmax-kmin > 1:
%o A036667             kmid = kmax+kmin>>1
%o A036667             if f(kmid) <= kmid:
%o A036667                 kmax = kmid
%o A036667             else:
%o A036667                 kmin = kmid
%o A036667         return kmax
%o A036667     def f(x): return n+x-sum((x//3**i).bit_length()+(i&1^1)>>1 for i in range(integer_log(x, 3)[0]+1))
%o A036667     return bisection(f,n,n) # _Chai Wah Wu_, Jan 30 2025
%Y A036667 Complement of A257999 with respect to A003586.
%Y A036667 Intersection of A028260 and A003586.
%Y A036667 Cf. A025620 (subsequence), A069352, A022328, A022329.
%K A036667 nonn
%O A036667 1,2
%A A036667 _N. J. A. Sloane_
%E A036667 Offset corrected by _Reinhard Zumkeller_, May 16 2015