OFFSET
1,1
COMMENTS
Conjecture: sequence is defined for all positive indices.
For p=prime(n), Eisenstein's irreducibility criterion can be used to show that the polynomial (x+1)^p-x^p is irreducible, which is a necessary (but not sufficient) condition for a(n) to exist. - T. D. Noe, Dec 05 2005
FORMULA
a(n) = A222119(n) + 1. - Ray Chandler, Feb 26 2017
EXAMPLE
2^prime(1)-1^prime(1)=3 is prime, so a(1)=2;
2^prime(5)-1^prime(5)=2047 has a factor of 23;
...
6^prime(5)-5^prime(5)=313968931 is prime, so a(5)=6;
MAPLE
f:= proc(n) local p, b;
p:= ithprime(n);
for b from 2 do
if isprime(b^p - (b-1)^p) then return b fi
od
end proc:
map(f, [$1..80]); # Robert Israel, Jun 04 2024
MATHEMATICA
Do[p=Prime[k]; n=2; nm1=n-1; cp=n^p-nm1^p; While[ !PrimeQ[cp], n=n+1; nm1=n-1; cp=n^p-nm1^p]; Print[n], {k, 1, 200}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Lei Zhou, Feb 24 2005
STATUS
approved