login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #24 Feb 05 2024 18:23:55

%S 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,

%T 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,

%U 4,1,2,1,2,2,2,2,2,1,2,1,6,2,4,1,2,2,2

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

%H Alois P. Heinz, <a href="/A366779/b366779.txt">Table of n, a(n) for n = 1..20000</a>

%H N. Harland, <a href="https://arxiv.org/abs/1111.3667">The iterated Carmichael lambda function</a>, arXiv:1111.3667 [math.NT], 2011.

%H G. Martin and C. Pomerance, <a href="http://www.math.dartmouth.edu/~carlp/PDF/lambda030205.pdf">The iterated Carmichael lambda-function and the number of cycles of the power generator</a>, Acta Arith. 118:4 (2005), pp. 305-335.

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

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

%p a:= n-> (numtheory[lambda]@@3)(n):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jan 19 2024

%t a[n_]:=Nest[CarmichaelLambda,n,3]; Array[a,87] (* _Stefano Spezia_, Jan 20 2024 *)

%o (PARI) a(n) = lcm(znstar(lcm(znstar(lcm(znstar(11)[2]))[2]))[2])

%o (Python)

%o from sympy import reduced_totient

%o def A366779(n): return reduced_totient(reduced_totient(reduced_totient(n))) # _Chai Wah Wu_, Jan 29 2024

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

%K nonn

%O 1,11

%A _Miles Englezou_, Dec 15 2023