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 A022331 #58 Sep 16 2024 12:46:52 %S A022331 1,2,4,6,9,13,17,22,28,34,41,48,56,65,74,84,95,106,118,130,143,157, %T A022331 171,186,202,218,235,253,271,290,309,329,350,371,393,416,439,463,487, %U A022331 512,538,564,591,619,647,676,706,736,767,798,830,863,896,930,965,1000,1036,1072 %N A022331 Index of 2^n within sequence of numbers of form 2^i*3^j (A003586). %H A022331 Amiram Eldar, <a href="/A022331/b022331.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Zak Seidov) %H A022331 Norman Carey, <a href="http://arxiv.org/abs/1303.0888">Lambda Words: A Class of Rich Words Defined Over an Infinite Alphabet</a>, arXiv preprint arXiv:1303.0888 [math.CO], 2013; <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Carey/carey6.html">Lambda Words: A Class of Rich Words Defined Over an Infinite Alphabet</a>, J. Int. Seq. 16 (2013), Article 13.3.4. %F A022331 a(n) = A071521(A000079(n)); A003586(a(n)) = A000079(n). - _Reinhard Zumkeller_, May 09 2006 %F A022331 a(n) ~ c * n^2, where c = log(2)/(2*log(3)) (A152747). - _Amiram Eldar_, Apr 07 2023 %t A022331 c[0] = 1; c[n_] := 1 + Sum[Ceiling[j*Log[3, 2]], {j, n}]; Table[c[i], {i, 0, 60}] (* _Norman Carey_, Jun 13 2012 *) %o A022331 (PARI) a(n)=my(t=1);1+n+sum(k=1,n,logint(t*=2,3)) \\ _Ruud H.G. van Tol_, Nov 25 2022 %o A022331 (Python) %o A022331 from sympy import integer_log %o A022331 def A022331(n): %o A022331 m = 1<<n %o A022331 return sum((m//3**i).bit_length() for i in range(integer_log(m,3)[0]+1)) # _Chai Wah Wu_, Sep 16 2024 %Y A022331 Cf. A000079, A003586, A071521, A020915 (first differences), A152747. %Y A022331 Cf. A022330 (index of 3^n within A003586). %K A022331 nonn %O A022331 0,2 %A A022331 _Clark Kimberling_