login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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