OFFSET
1,2
COMMENTS
Smallest number k such that the trajectory of k under iteration of Carmichael lambda function contains exactly n distinct numbers (including k and the fixed point).
The first 13 terms are 1 or a prime. The next five terms are powers of 3. Then another prime. What explains this behavior? - T. D. Noe, Mar 23 2012
A185816(a(n)) = n - 1. - Reinhard Zumkeller, Sep 02 2014
If a(n) (n > 1) is either a prime or a power of 3, then a(n) is also the smallest integer k such that the number of iterations of Euler's totient function (A000010) needed to reach 1 starting at k (k is counted) is n. - Jianing Song, Jul 10 2019
LINKS
Nick Harland, The number of iterates of the Carmichael lambda function required to reach 1, arXiv:1203.4791v1 [math.NT], Mar 21 2012.
EXAMPLE
for n=5, a(5)=11 gives a chain of length 5 because the trajectory is 11 -> 10 -> 4 -> 2 -> 1.
MATHEMATICA
f[n_] := Length@ NestWhileList[ CarmichaelLambda, n, Unequal, 2] - 1; t = Table[0, {30}]; k = 1; While[k < 2100000001, a = f@ k; If[ t[[a]] == 0, t[[a]] = k; Print[a, " = ", k]]; k++] (* slightly modified by Robert G. Wilson v, Sep 01 2014 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a173927 = (+ 1) . fromJust . (`elemIndex` map (+ 1) a185816_list)
-- Reinhard Zumkeller, Sep 02 2014
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Michel Lagneau, Nov 26 2010
EXTENSIONS
a(20)-a(21) from Robert G. Wilson v, Sep 01 2014
STATUS
approved