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.

Showing 1-2 of 2 results.

A053044 a(n) is the number of iterations of the Euler totient function to reach 1, starting at n!.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 10, 13, 15, 18, 21, 24, 27, 30, 33, 37, 41, 44, 47, 51, 54, 58, 62, 66, 70, 74, 77, 81, 85, 89, 93, 98, 102, 107, 111, 115, 119, 123, 127, 132, 137, 141, 145, 150, 154, 159, 164, 169, 173, 178, 183, 188, 193, 197, 202, 207, 211, 216, 221, 226, 231
Offset: 1

Views

Author

Labos Elemer, Feb 25 2000

Keywords

Comments

Powers of 2 arise at the end of iteration chains without interruption. Analogous to A053025 and A053034. The order of speed of convergence is as follows: A000005 > A000010 > A051953: e.g., for 20! the lengths of the corresponding iteration chains are 6, 51, and 101, respectively.
Partial sums of A064415.

Examples

			For n=1, no iteration is needed, so a(1)=0;
for n=2, the initial value is 2! = 2, so phi() must be applied once, thus a(2)=1;
for n=8, the iteration chain is {40320, 9216, 3072, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}; its length = 14 = a(8) + 1, so the number of iterations applied to reach 1 is a(8)=13.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@ NestWhileList[EulerPhi, n!, # > 1 &] - 1, {n, 61}] (* or *)
    Table[Length@ FixedPointList[EulerPhi, n!] - 2, {n, 61}] (* Michael De Vlieger, Jan 01 2017 *)
  • PARI
    a(n) = {my(nb = 0, ns = n!); while (ns != 1, ns = eulerphi(ns); nb++); nb;} \\ Michel Marcus, Jan 01 2017

Formula

a(n) = A003434(A000142(n)). - Michel Marcus, Jan 01 2017

A053096 When the Euler phi function is iterated with initial value A002110(n) = primorial, a(n) = number of iterations required to reach the fixed number = 1.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 19, 23, 27, 31, 35, 40, 44, 49, 54, 59, 64, 69, 74, 79, 84, 90, 96, 102, 108, 114, 120, 125, 131, 136, 142, 149, 155, 161, 167, 173, 178, 185, 191, 198, 204, 210, 217, 223, 229, 235, 241, 248, 254, 261, 268, 275, 282, 290, 297, 304, 310
Offset: 1

Views

Author

Labos Elemer, Feb 28 2000

Keywords

Comments

Analogous to A053025, A053034, A053044. For comparison: iteration of, e.g., A000005 to primorial i.v. is trivially computable: q(n)=A002110(n), d(q(n)) = 2^n, d(d(q(n))) = n+1 and so A036450(A002110(n)) = A000005(n+1).

Examples

			n=7, A002110(7)=510510; the corresponding iteration chain is {510510, 92160, 24576, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1}. Its length is 17, so the required number of iterations is a(7)=16.
		

Crossrefs

Programs

  • Mathematica
    Array[-2 + Length@ FixedPointList[EulerPhi, Product[Prime@ i, {i, #}]] &, 58] (* Michael De Vlieger, Nov 20 2017 *)
  • PARI
    a(n)=my(t=prod(i=1,n,prime(i)-1),s=1); while(t>1, t=eulerphi(t); s++); s \\ Charles R Greathouse IV, Jan 06 2016
    
  • PARI
    A003434(n)=my(s);while(n>1,n=eulerphi(n);s++);s
    first(n)=my(s=1); vector(n,k,s+=A003434(prime(k))-1) \\ Charles R Greathouse IV, Jan 06 2016

Formula

a(n) is the smallest number such that Nest[EulerPhi, A002110, a(n)]=1
Showing 1-2 of 2 results.