cp's OEIS Frontend

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.

A253092 Log_3(A133579(n)).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 14 2015

Keywords

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

Examples

			a(18)=a(17)-2 because 18=3^2, a(81)=a(80)-4 because 81=3^4.
		

Crossrefs

Cf. A133579.

Programs

  • 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 *)
  • PARI
    a=-1;A253092=vector(1000,n,a+=if(n%3,1,-valuation(n,3))) \\ M. F. Hasler, Feb 15 2015