A187023 a(n) is the smallest prime factor of n^n-1 having the form k*n+1.
3, 13, 5, 11, 7, 29, 17, 19, 11, 15797, 13, 53, 7027567, 61, 17, 10949, 19, 109912203092239643840221, 41, 43, 23, 461, 73, 101, 937, 109, 29, 59, 31, 568972471024107865287021434301977158534824481, 257, 67, 103, 281, 37, 149, 191, 157, 41
Offset: 2
Keywords
Examples
7^7-1 = 2*3*29*4733; the smallest prime divisor of the form k*n+1 is 29 = 4*7+1, hence a(7) = 29.
Links
- Amiram Eldar, Table of n, a(n) for n = 2..138
Programs
-
Magma
A187023:=function(n); for d in PrimeDivisors(n^n-1) do if d mod n eq 1 then return d; end if; end for; return 0; end function; [ A187023(n): n in [2..50] ]; // Klaus Brockhaus, Mar 02 2011
-
Mathematica
Table[p=First/@FactorInteger[n^n-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 40}]
Comments