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”).
%I #6 Dec 19 2018 19:02:53
%S 3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,7,2,3,2,3,2,5,2,3,2,3,2,7,2,3,2,3,2,
%T 5,2,3,2,3,2,13,2,3,2,3,2,5,2,3,2,3,2,5,2,3,2,3,2,7,2,3,2,3,2,5,2,3,2,
%U 3,2,5,2,3,2,3,2,7,2,3,2,3,2,5,2,3,2,3,2,7,2,3,2,3,2,5,2,3,2,3,2,7,2
%N Least prime factor of n^n-1.
%C If n is odd then a(n)=2; also, if n is even and not divisible by 3 then a(n)=3. - _Zak Seidov_, Mar 03 2006
%H Antti Karttunen, <a href="/A116895/b116895.txt">Table of n, a(n) for n = 2..16384</a>
%e 6^6-1=5*7*31*43, so a(6)=5.
%t Table[FactorInteger[GCD[n^n-1, 200! ]][[1,1]], {n, 2, 130}]
%o (PARI) A116895(n) = { my(k=(n^n)-1); forprime(p=2, ,if(!(k%p),return(p))); }; \\ _Antti Karttunen_, Dec 19 2018
%Y Cf. A006486, A007571, A048861.
%K nonn
%O 2,1
%A _Giovanni Resta_, Mar 02 2006