OFFSET
1,7
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
spi[n_] := Sum[Floor@Log[2, n/3^k] + 1, {k, 0, Floor@Log[3, n]}];
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];
seq[100] (* Jean-François Alcover, Dec 17 2021, after Andrew Howroyd's PARI code *)
PROG
(PARI) \\ here spi(n) is A071521(n).
spi(n)={sum(k=0, logint(n, 3), logint(n\3^k, 2)+1)}
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
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Jul 21 2004
EXTENSIONS
Terms a(40) and beyond from Andrew Howroyd, Jan 06 2020
STATUS
approved