login
A086508
If n is even, a(n) = smallest prime == -1 (mod n), If n is odd, a(n) = smallest prime == 1 (mod n).
1
2, 3, 7, 3, 11, 5, 29, 7, 19, 19, 23, 11, 53, 13, 31, 31, 103, 17, 191, 19, 43, 43, 47, 23, 101, 103, 109, 83, 59, 29, 311, 31, 67, 67, 71, 71, 149, 37, 79, 79, 83, 41, 173, 43, 181, 137, 283, 47, 197, 149, 103, 103, 107, 53, 331, 167, 229, 173, 709, 59, 367, 61, 127
OFFSET
1,1
MATHEMATICA
Join[{2}, With[{prs=Prime[Range[500]]}, Flatten[Table[If[OddQ[n], Select[ prs, Mod[#, n] == 1&, 1], Select[prs, Mod[#, n]==n-1&, 1]], {n, 70}]]]] (* Harvey P. Dale, Nov 16 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 29 2003
EXTENSIONS
More terms from David Wasserman, Mar 09 2005
STATUS
approved