OFFSET
1,1
COMMENTS
a(n) = 1 iff n-1 is prime.
a(145) is either 0 or > 275000. - Robert G. Wilson v, Jan 23 2017
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..144
Steven Harvey, Generalized Woodall Primes
EXAMPLE
1*1^1 - 1 = 0 is not prime. 2*1^2 - 1 = 1 is not prime. 3*1^3 - 1 = 2 is prime. Thus, a(1) = 3.
PROG
(PARI) a(n)=k=1; while(!ispseudoprime(k*n^k-1), k++); return(k); n=1; while(n<100, print(a(n)); n+=1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Apr 02 2014
EXTENSIONS
a(23) and a(29) given using link. - Derek Orr, Aug 16 2014
STATUS
approved