OFFSET
1,3
COMMENTS
It would be good to have a proof that a(n) is always finite. - N. J. A. Sloane, Sep 06 2014
FORMULA
a(n) >= A245459(n).
EXAMPLE
a(2) = 1 because 2^2 - 1^2 = 3 is prime;
a(3) = 2 because 2^3 - 1^2 = 7 is prime and 3^3 - 2^3 = 19 is prime, but 2^3 - 2^3 < 0, 5^3 - 2^5 = 93 is not prime, 5^3 - 2^7 = 215 is not prime, 9^3 - 2^9 = 217 is not prime, 11^3 - 2^11 < 0.
More generally, primes of the form k^r - m^k where k > m > 0:
r = 2: 3;
r = 3: 7, 19;
r = 4: 7, 17, 73, 593, 2273, 20369;
r = 5: 7, 23, 31, 179, 58537, 1951811, 1986949;
r = 6: 4818617, 24006497;
r = 7: 7, 47, 79, 103, 127, 1137, 2179, 77101, 162287, 543607, 1706527, 9940951, 6069961193, 25365130463;
r = 8: 31, 6553, 141793, 49046209, 815722529, 16983038753, 499709542049;
r = 9: 71, 151, 223, 431, 463, 487, 503, 4521799, 133227103, 10604491181, 1175888158183;
r = 10: 4177, 37097, 58049, 58537, 1803001, 2486784401, 3486783889, 41426502825041, 819626139497153, 52458394747474721.
MATHEMATICA
f[r_] := Length@ Rest@ Union@ Flatten@ Table[ If[ PrimeQ[k^r - m^k], k^r - m^k, 0], {k, 2, 10000000}, {m, Floor[k^(r/k)]}]; Do[ Print[ f[r]], {r, 2, 50}] (* Robert G. Wilson v, Aug 25 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 15 2014
EXTENSIONS
a(10)-a(50) from Robert G. Wilson v, Aug 25 2014
STATUS
approved