A092067 a(n) is the smallest number m such that m > 1 and m divides n^m + 1.
2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1
Keywords
Examples
a(6)=7 because 7 divides 6^7 + 1 and there doesn't exist m such that 1 < m < 7 and m divides 6^m + 1.
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_] := (For[k=2, Mod[n^k+1, k]>0, k++ ];k); Table[a[n], {n, 100}] snm[n_]:=Module[{m=2},While[PowerMod[n,m,m]!=m-1,m++];m]; Array[snm,100] (* Harvey P. Dale, Jul 31 2021 *)
Comments