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
M. F. Hasler, Table of n, a(n) for n = 0..3000
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
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 14 2015
STATUS
approved