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.

A098115 a(n) is the length of iteration trajectory when the cototient function (A051953) is applied to the half of the n-th primorial number (A070826(n) = A002110(n)/2).

Original entry on oeis.org

2, 3, 4, 7, 10, 5, 12, 15, 12, 28, 6, 6, 31, 12, 47, 29, 23, 32, 33, 24, 40, 28, 12, 35, 34, 56, 17, 36, 40, 123, 57, 61, 9, 99, 94, 132, 158, 172, 23, 43, 89, 186, 196, 194, 203, 157, 205, 62, 32, 26, 76, 105, 65, 45, 177, 56, 278
Offset: 1

Views

Author

Labos Elemer, Sep 27 2004

Keywords

Comments

Initial values are here odd numbers. Comparing with the case of primorials (A098202), the lengths are here significantly smaller. The cause of this is unknown, albeit informally "understood": lack of powers of 2 in lists because parity is invariant during this iteration. See also lists for A098200 and A098201.

Examples

			For n = 7: list = {255255,163095,77815,16663,895,183,63,27,9,3,1,0}, a(7) = 12, while the comparable length for 510510 is A098202(7) = 43.
		

Crossrefs

Programs

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

Formula

a(n) = A053475(A070826(n)) = A053475(A002110(n)/2).

Extensions

a(38)-a(57) from Amiram Eldar, Nov 19 2024