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.

A185816 Number of iterations of lambda(n) needed to reach 1.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Feb 05 2011

Keywords

Comments

lambda(n) is the Carmichael lambda function, A002322.
a(n) = (length of row n in table A246700) - 1. - Reinhard Zumkeller, Sep 02 2014

Examples

			If n = 23 the trajectory is 23, 22, 10, 4, 2, 1. Its length is 6, thus a(23) = 5.
		

Crossrefs

Programs

  • Haskell
    a185816 n = if n == 1 then 0 else a185816 (a002322 n) + 1
    -- Reinhard Zumkeller, Sep 02 2014
  • Maple
    a:= n-> `if`(n=1, 0, 1+a(numtheory[lambda](n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 27 2019
  • Mathematica
    f[n_] := Length[ NestWhileList[ CarmichaelLambda, n, Unequal, 2]] - 2; Table[f[n], {n, 1, 120}]

Formula

For n > 1: a(n) = a(A002322(n)) + 1. - Reinhard Zumkeller, Sep 02 2014

A375478 Irregular triangle read by rows in which row n lists the iterates of the phi(x) map from n to 1, where phi(x) is Euler's totient function (A000010).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 2, 1, 5, 4, 2, 1, 6, 2, 1, 7, 6, 2, 1, 8, 4, 2, 1, 9, 6, 2, 1, 10, 4, 2, 1, 11, 10, 4, 2, 1, 12, 4, 2, 1, 13, 12, 4, 2, 1, 14, 6, 2, 1, 15, 8, 4, 2, 1, 16, 8, 4, 2, 1, 17, 16, 8, 4, 2, 1, 18, 6, 2, 1, 19, 18, 6, 2, 1, 20, 8, 4, 2, 1, 21, 12, 4, 2, 1
Offset: 1

Views

Author

Paolo Xausa, Aug 17 2024

Keywords

Comments

First differs from A246700 at n = 22.

Examples

			Triangle begins:
   1;
   2, 1;
   3, 2, 1;
   4, 2, 1;
   5, 4, 2, 1;
   6, 2, 1;
   7, 6, 2, 1;
   8, 4, 2, 1;
   9, 6, 2, 1;
  10, 4, 2, 1;
  ...
		

Crossrefs

Supersequence of A246700.
Cf. A000010, A049108 (row lengths), A053478 (row sums).

Programs

  • Mathematica
    Array[Most[FixedPointList[EulerPhi, #]] &, 25]

Formula

T(n,1) = n; T(n,k) = A000010(T(n,k-1)), for k = 2..A049108(n).
Showing 1-2 of 2 results.