OFFSET
3,3
COMMENTS
a(n) = 1 iff n-1 is prime.
EXAMPLE
5^1 - 5^0 = 4 is not prime. 5^2 - 5^1 - 5^0 = 19 is prime. Thus a(5) = 2.
PROG
(PARI) a(n)=for(k=1, 10^3, if(ispseudoprime(n^k-sum(i=0, k-1, n^i)), return(k)))
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 04 2014
STATUS
approved