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.

A326195 Number of iterations of x -> A009195(x) needed to reach 1 when starting from x = n, where A009195(x) = gcd(x, phi(x)).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 1, 4, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 2, 1, 5, 1, 2, 1, 4, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 5, 2, 3, 1, 3, 1, 4, 2, 4, 2, 2, 1, 3, 1, 2, 3, 6, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 2, 3, 1, 3, 1, 5, 4, 2, 1, 4, 1, 2, 1, 4, 1, 3, 1, 3, 2, 2, 1, 6, 1, 3, 2, 4, 1, 2, 1, 4, 2
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[NestWhileList[GCD[#,EulerPhi[#]]&,n,#>1&]]-1,{n,110}] (* Harvey P. Dale, Dec 21 2022 *)
  • PARI
    A326195(n) = if(1==n,0,1+A326195(gcd(n,eulerphi(n))));

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A009195(n)).
a(n) < A326196(n).