OFFSET
2,1
COMMENTS
For n > 2, if n == 2 (mod 6), then k^n - k + 1 is divisible by k^2 - k + 1. Thus it will never be prime.
PROG
(PARI)
a(n)=if(n>2&&n==Mod(2, 6), return(0)); k=1; while(!ispseudoprime(k^n-k+1)||!ispseudoprime(k^n-k-1), k++); k
n=2; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Sep 30 2014
STATUS
approved