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.

A366779 a(n) = lambda(lambda(lambda(n))), where lambda(n) is the Carmichael lambda function (A002322).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 4, 10, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 6, 1, 2, 2, 1, 2, 1, 2, 4, 2, 4, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 6, 2, 4, 1, 2, 2, 2
Offset: 1

Views

Author

Miles Englezou, Dec 15 2023

Keywords

Examples

			a(5) = 1, since A181776(5) = 2, and A002322(2) = 1.
		

Crossrefs

Cf. A002322 (lambda function), A181776 (lambda function at two iterations).

Programs

  • Maple
    a:= n-> (numtheory[lambda]@@3)(n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 19 2024
  • Mathematica
    a[n_]:=Nest[CarmichaelLambda,n,3]; Array[a,87] (* Stefano Spezia, Jan 20 2024 *)
  • PARI
    a(n) = lcm(znstar(lcm(znstar(lcm(znstar(11)[2]))[2]))[2])
    
  • Python
    from sympy import reduced_totient
    def A366779(n): return reduced_totient(reduced_totient(reduced_totient(n))) # Chai Wah Wu, Jan 29 2024

Formula

a(n) = A002322(A181776(n)).