login
A253092
Log_3(A133579(n)).
2
0, 0, 1, 0, 1, 2, 1, 2, 3, 1, 2, 3, 2, 3, 4, 3, 4, 5, 3, 4, 5, 4, 5, 6, 5, 6, 7, 4, 5, 6, 5, 6, 7, 6, 7, 8, 6, 7, 8, 7, 8, 9, 8, 9, 10, 8, 9, 10, 9, 10, 11, 10, 11, 12, 9, 10, 11, 10, 11, 12, 11, 12, 13, 11, 12, 13, 12, 13, 14, 13, 14, 15, 13, 14, 15, 14, 15, 16
OFFSET
0,6
COMMENTS
Using the definition of A133579 this amounts to a(n) = a(n-1)-valuation_3(n) if n=3k, and a(n) = a(n-1)+1 else. - M. F. Hasler, Feb 15 2015
LINKS
EXAMPLE
a(18)=a(17)-2 because 18=3^2, a(81)=a(80)-4 because 81=3^4.
MATHEMATICA
nxt[{n_, a_}] := {n + 1, If[CoprimeQ[a, n + 1], 3 a, a/GCD[a, n + 1]]}; Log[3, #]&/@Join[{1}, Transpose[NestList[nxt, {1, 1}, 80]][[2]]] (* Harvey P. Dale, Feb 14 2015 *)
PROG
(PARI) a=-1; A253092=vector(1000, n, a+=if(n%3, 1, -valuation(n, 3))) \\ M. F. Hasler, Feb 15 2015
CROSSREFS
Cf. A133579.
Sequence in context: A285730 A353655 A280055 * A194546 A369320 A115452
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 14 2015
STATUS
approved