OFFSET
0,4
COMMENTS
The next terms after the missing a(11) are 31, 58, 4, 596, 3.
a(11) > 20000 or a(11) = 0, a(17) = 4308, a(18) = 1073, a(19) > 20000 or a(19) = 0. - Jason Yuen, May 21 2024
EXAMPLE
3^3 * 1 + 1 = 28 is not a prime, 3^3 * 2^2 + 1 = 109 is a prime, so a(3) = 2.
PROG
(Java)
import java.math.BigInteger;
public class A228175 {
public static void main (String[] args) {
for (int n = 0; n < 333; n++) {
BigInteger nn = BigInteger.valueOf(n).pow(n);
int k = 1;
for (; k<10000; k++) {
BigInteger kk = BigInteger.valueOf(k).pow(k).multiply(nn).add(BigInteger.ONE);
if (kk.isProbablePrime(80)) {
System.out.printf("%d, ", k);
break;
}
}
if (k==10000) System.out.printf("- ");
}
}
}
(PARI) A228175(n, L=9e9, s=1)={forstep(k=s+(bittest(n, 0)&&n>1&&bittest(s, 0)), L, 1+bittest(n, 0), ispseudoprime(n^n*k^k+1)&&return(k))} \\ Optional args allow specification of start and limit for search; for odd n > 1, only check even k. - M. F. Hasler, Nov 03 2013
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Alex Ratushnyak, Nov 02 2013
STATUS
approved