%I #22 Oct 29 2022 04:51:23
%S 1,1,2,2,3,2,4,2,4,3,4,2,6,4,3,3,5,4,6,3,4,4,4,2,6,6,6,4,6,3,8,4,4,5,
%T 6,4,9,6,6,3,8,4,8,4,6,4,4,3,8,6,5,6,6,6,6,4,6,6,4,3,12,8,4,5,6,4,8,5,
%U 4,6,8,4,12,9,6,6,8,6,8,3,8,8,4,4,5,8,6,4,8,6,6,4,8,4,9,4,12,8,8,6,9,5,8
%N Number of different eventual period lengths for power sequences mod n; i.e., number of different period lengths of repeating digits of 1/n in different bases.
%H Antti Karttunen, <a href="/A066800/b066800.txt">Table of n, a(n) for n = 1..10000</a>
%H Florian Luca and Carl Pomerance, <a href="https://math.dartmouth.edu/~carlp/PDF/luca030206.pdf">On the average number of divisors of the Euler function</a>, Publicationes Mathematicae Debrecen, Vol. 70, No. 1-2 (2007), pp. 125-148.
%F Number of divisors of reduced totient function: a(n) = A000005(A002322(n)).
%F Sum_{k=1..n} a(k) ~ n * exp(c(n) * (log(n)/log(log(n)))(1/2) * (1 + O(log(log(log(n)))/log(log(n))))), where c(n) is a number in the interval (1/7, 2*sqrt(2))*exp(-gamma/2) and gamma is A001620 (Luca and Pomerance, 2007). - _Amiram Eldar_, Oct 29 2022
%e Modulo 5, powers of 1,6,11 etc. are 1,1,1,1,1,1,...; of 2,7,12 etc. are 1,2,4,3,1,2,4,3,...; of 3,8,13 etc. are 1,3,4,2,1,3,4,2,...; of 4,9,14 etc. are 1,4,1,4,1,4,...; of 5,10,15 etc. are 1,0,0,0,0,... So the eventual period lengths are 1,4,4,2,1 giving three distinct lengths, so a(5)=3.
%p A066800 := proc(n)
%p numtheory[tau](numtheory[lambda](n)) ;
%p end proc:
%p seq(A066800(n),n=1..100) ; # _R. J. Mathar_, Oct 01 2017
%t Array[DivisorSigma[0, CarmichaelLambda@ #] &, 103] (* _Michael De Vlieger_, Jul 16 2017 *)
%o (PARI)
%o A002322(n) = lcm(znstar(n)[2]); \\ This function from _Charles R Greathouse IV_, Aug 04 2012
%o A066800(n) = numdiv(A002322(n)); \\ _Antti Karttunen_, Jul 16 2017
%Y This is the number of different values of rows of the square array A066799.
%Y Cf. also A206941.
%Y Cf. A000005, A001620, A002322.
%K nonn
%O 1,3
%A _Henry Bottomley_, Dec 20 2001
%E More terms from _David Wasserman_, Nov 14 2002