login
A087896
Least prime p such that n^p - (n-1)^p is composite.
2
11, 7, 5, 2, 3, 5, 2, 3, 5, 2, 5, 2, 2, 5, 3, 2, 2, 3, 2, 3, 3, 2, 5, 2, 2, 3, 2, 2, 3, 7, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 7, 2, 2, 3, 2, 2, 2, 5, 2, 3, 3, 2, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2, 5, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 3, 2, 2, 5, 2, 3, 2, 2, 5, 2
OFFSET
2,1
COMMENTS
The least n such that a(n) = p is found in A229073. - Eric M. Schmidt, Sep 12 2013
LINKS
MATHEMATICA
Table[p = 2; While[PrimeQ[n^p - (n - 1)^p], p = NextPrime[p]]; p, {n, 2, 88}] (* T. D. Noe, Sep 12 2013 *)
PROG
(PARI) a(n) = {forprime(p=2, default(primelimit), if(!isprime(n^p-(n-1)^p), return(p)))}
CROSSREFS
Sequence in context: A305273 A236546 A155914 * A240598 A144262 A110093
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 26 2003
EXTENSIONS
Edited by Charles R Greathouse IV, Nov 02 2009
STATUS
approved