# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a096067 Showing 1-1 of 1 %I A096067 #19 Dec 17 2021 09:50:23 %S A096067 0,0,0,1,0,1,2,0,3,1,2,4,0,5,2,3,6,0,6,5,2,8,2,6,8,1,10,4,6,11,0,11,8, %T A096067 4,13,3,10,12,2,15,6,9,16,0,17,9,8,18,2,16,14,5,20,6,14,19,2,22,10,12, %U A096067 23,1,22,16,8,25,6,19,22,4,27,11,16,28,0,29,16,13,30,4 %N A096067 Number of 3-smooth numbers between successive numbers that are powers of 2 or of 3. %C A096067 a(n) = {k: A006899(n) < A003586(k) < A006899(n+1)}. %H A096067 Andrew Howroyd, Table of n, a(n) for n = 1..10000 %e A096067 n=16: there are three 3-smooth numbers between A006899(16)=3^6=729 and A006899(17)=2^10=1024: A003586(38)=2^8*3=768, A003586(39)=2^5*3^3=864 and A003586(40)=2^2*3^5=972, therefore a(16)=3. %t A096067 spi[n_] := Sum[Floor@Log[2, n/3^k] + 1, {k, 0, Floor@Log[3, n]}]; %t A096067 seq[n_] := Module[{a = Table[0, {n}], p = 1, s = 1}, For[i = 1, i <= Length[a], i++, p = Min[2^(1 + Floor@Log[2, p]), 3^(1 + Floor@Log[3, p])]; With[{t = spi[p]}, a[[i]] = t - s - 1; s = t]]; a]; %t A096067 seq[100] (* _Jean-François Alcover_, Dec 17 2021, after _Andrew Howroyd_'s PARI code *) %o A096067 (PARI) \\ here spi(n) is A071521(n). %o A096067 spi(n)={sum(k=0, logint(n, 3), logint(n\3^k, 2)+1)} %o A096067 seq(n)={my(a=vector(n), p=1, s=1); for(i=1, #a, p=min(2^(1+logint(p,2)), 3^(1+logint(p,3))); my(t=spi(p)); a[i]=t-s-1; s=t); a} \\ _Andrew Howroyd_, Jan 07 2020 %Y A096067 Cf. A003586, A006899, A071521. %K A096067 nonn,look %O A096067 1,7 %A A096067 _Reinhard Zumkeller_, Jul 21 2004 %E A096067 Terms a(40) and beyond from _Andrew Howroyd_, Jan 06 2020 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE