A240234 Least number k such that k*n^k + 1 is prime, or 0 if no such number exists.
1, 1, 2, 1, 1242, 1, 34, 5, 2, 1, 10, 1
Offset: 1
Examples
1*3^1 + 1 = 4 is not prime. 2*3^2 + 1 = 19 is prime. Thus, a(3) = 2.
Links
- Guenter Loeh, Generalized Cullen primes n b^n + 1
- Jeppe Stig Nielsen, Table of a(n) for n = 1..100, with unknown entries denoted by question marks
Programs
-
PARI
a(n) = for(k=1,4000,if(ispseudoprime(k*n^k+1),return(k))) n=1;while(n<100,print1(a(n),", ");n++)
Comments