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.

A098202 a(n) is the length of the iteration trajectory when the cototient function (A051953) is applied to the n-th primorial number (A002110(n)).

Original entry on oeis.org

3, 5, 8, 12, 18, 20, 31, 32, 41, 43, 61, 65, 80, 77, 95, 125, 131, 125, 157, 173, 140, 192, 195, 221, 213, 212, 261, 269, 277, 300, 296, 321, 336, 329, 358, 367, 379, 405, 428, 439, 438, 464, 477, 493, 506, 454, 491, 542, 564, 588, 543, 600, 639, 660
Offset: 1

Views

Author

Labos Elemer, Sep 22 2004

Keywords

Examples

			For n = 3: list = {30,22,12,8,4,2,1,0}, a(4) = 8.
		

Crossrefs

Programs

  • Mathematica
    g[x_] := x - EulerPhi[x]; f[x_] := Length[ FixedPointList[g, x]] - 1; q[x_] := Product[ Prime[j], {j, x}]; Table[ f[ q[n]], {n, 33}]
    a[n_] := Length@ NestWhileList[(# - EulerPhi[#])&, Times @@ Prime[Range[n]], # > 0 &]; Array[a, 30] (* Amiram Eldar, Nov 19 2024 *)
  • PARI
    a(n) = {my(p = prod(i=1, n, prime(i)), c = 1); while(p > 0, c++; p -= eulerphi(p)); c;} \\ Amiram Eldar, Nov 19 2024

Formula

a(n) = A053475(A002110(n)). - Robert G. Wilson v, Sep 22 2004

Extensions

More terms from Robert G. Wilson v, Sep 22 2004
a(37)-a(54) from Amiram Eldar, Nov 19 2024