A283450 Least prime p such that n*(p^n-1)+1 is prime.
2, 2, 3, 2, 19, 2, 5, 17, 13, 7, 1129, 59, 47, 7, 19, 7, 31, 79, 11, 37, 199, 5, 907, 43, 5, 43, 3, 13, 919, 2, 13, 2, 263, 127, 241, 3, 131, 71, 11, 421, 223, 2, 31, 3, 7, 89, 3673, 61, 293, 5, 131, 919, 3, 3, 349, 457, 1091, 461, 67, 7, 331, 7177, 571, 43, 1621, 109, 2521, 3, 1061, 5, 967, 1093, 1423
Offset: 1
Keywords
Examples
For n=5, 5*(19^5-1)+1 = 12380491 is prime, but 5*(p^5-1)+1 is not prime for primes p < 19, so a(5)=19.
Links
- Robert Israel, Table of n, a(n) for n = 1..600
Programs
-
Maple
f:= proc(n) local p; p:= 2: while not isprime(n*(p^n-1)+1) do p:= nextprime(p) od; p end proc: map(f, [$1..100]);
-
Mathematica
Table[p=2; While[!PrimeQ[n (p^n-1)+1], p=NextPrime@p]; p, {n, 100}] (* Vincenzo Librandi, Oct 11 2017 *)
-
PARI
a(n)=forprime(p=2,, if(ispseudoprime(n*(p^n-1)+1), return(p))) \\ Charles R Greathouse IV, Mar 07 2017
Comments