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.

A191476 Values of j in the numbers 2^i*3^j, i >= 1, j >= 1, arranged in increasing order (A033845).

This page as a plain text file.
%I A191476 #35 Sep 16 2024 12:48:25
%S A191476 1,1,2,1,2,1,3,2,1,3,2,4,1,3,2,4,1,3,5,2,4,1,3,5,2,4,6,1,3,5,2,4,6,1,
%T A191476 3,5,7,2,4,6,1,3,5,7,2,4,6,1,8,3,5,7,2,4,6,1,8,3,5,7,2,9,4,6,1,8,3,5,
%U A191476 7,2,9,4,6,1,8,3,10,5,7,2,9,4,6,1,8,3
%N A191476 Values of j in the numbers 2^i*3^j, i >= 1, j >= 1, arranged in increasing order (A033845).
%C A191476 This is the signature sequence of log(2)/log(3) (compare A022328). - _N. J. A. Sloane_, May 26 2024
%H A191476 Zak Seidov, <a href="/A191476/b191476.txt">Table of n, a(n) for n = 1..10000</a>
%H A191476 <a href="/index/Si#signature_sequences">Index entries for sequences related to signature sequences</a>
%e A191476 a(10) = 3 because A033845(10) = 108 = 2^2*3^3.
%e A191476 a(100) = 7 because A033845(100) = 59872 = 2^8*3^7.
%e A191476 a(1000) = 1 because A033845(1000) = 216172782113783808 = 2^56*3^1.
%t A191476 mx = 1000000; t = Select[Sort[Flatten[Table[2^i 3^j, {i, Log[2, mx]}, {j, Log[3, mx]}]]], # <= mx &]; Table[FactorInteger[i][[2, 2]], {i, t}] (* _T. D. Noe_, Aug 31 2012 *)
%o A191476 (Python)
%o A191476 from sympy import integer_log
%o A191476 def A191476(n):
%o A191476     def bisection(f,kmin=0,kmax=1):
%o A191476         while f(kmax) > kmax: kmax <<= 1
%o A191476         while kmax-kmin > 1:
%o A191476             kmid = kmax+kmin>>1
%o A191476             if f(kmid) <= kmid:
%o A191476                 kmax = kmid
%o A191476             else:
%o A191476                 kmin = kmid
%o A191476         return kmax
%o A191476     def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1))
%o A191476     return 1+integer_log((m:=bisection(f,n,n))>>(~m&m-1).bit_length(),3)[0] # _Chai Wah Wu_, Sep 15 2024
%Y A191476 Cf. A033845 (numbers 2^i*3^j), A191475 (values of i).
%Y A191476 A022329 (= a(n)-1) is an essentially identical sequence.
%Y A191476 See also A022328.
%K A191476 nonn
%O A191476 1,3
%A A191476 _Zak Seidov_, Aug 30 2012
%E A191476 Edited by _N. J. A. Sloane_, May 26 2024