OFFSET
2,1
COMMENTS
Motivated by even base-2 pseudoprime 161038, I inquired into base-n pseudoprimes kn that are multiples of n, i.e., n^(kn) == n (mod kn). This is equivalent to n^(kn-1) == 1 (mod k) [W. Edwin Clark] and is satisfied by any k dividing n-1 [Michael Reid]. For n >= 3, this guarantees the existence of a(n) with 2 <= a(n) = k <= lpf(n-1) (lpf = least prime factor). For most n, a(n) = lpf(n-1), exceptional n and a(n) are noted in A102458 and A102459.
LINKS
Antti Karttunen, Table of n, a(n) for n = 2..12620
Antti Karttunen, Data supplement: n, a(n) computed for n = 2..100000
MATHEMATICA
Array[Block[{k = 2}, While[PowerMod[#, k # - 1, k] != 1, k++]; k] &, 93, 2] (* Michael De Vlieger, Nov 13 2018 *)
PROG
(PARI) A102457(n) = { for(k=2, oo, if(1==(Mod(n, k)^((k*n)-1)), return(k)); ); } \\ Antti Karttunen, Nov 10 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David W. Wilson, Jan 09 2005
STATUS
approved