login
A246060
Number of primes of the form k^(n - m) - m^k where n > 2 and positive k, m.
0
1, 1, 1, 5, 4, 5, 4, 7, 2, 8, 3, 10, 1, 12, 7, 13, 1, 11, 6, 13, 6, 19, 3, 12, 4, 17, 4, 10, 2, 18, 4, 15, 3, 21, 6, 14, 8, 18, 9, 23, 7, 9, 7, 21, 5, 13, 6, 22, 8, 16, 8, 24, 5, 22, 9, 12, 6, 26, 9, 26, 11, 27, 5, 30, 14, 34, 9, 23, 9, 48, 7, 11, 14, 37, 8, 32
OFFSET
3,4
EXAMPLE
a(3) = 1 because 2^(3 - 1) - 1^2 = 3 is prime with k = 2 and m = 1;
a(4) = 1 because 2^(4 - 1) - 1^2 = 7 is prime with k = 2 and m = 1;
a(5) = 1 because 3^(5 - 2) - 2^3 = 19 is prime with k = 3 and m = 2.
PROG
(PARI) a(n) = {my(k=2, q, v=List([])); if(ispseudoprime(q=2^(n-1)-1), listput(v, q)); while(k^(n-2)>2^k, if(ispseudoprime(q=k^(n-2)-2^k), listput(v, q)); k++); for(m=3, n-2, for(t=2, k-1, if(ispseudoprime(q=t^(n-m)-m^t), listput(v, q)))); #Set(v); } \\ Jinyuan Wang, Feb 24 2020
CROSSREFS
Sequence in context: A093348 A262604 A276500 * A316327 A001050 A113784
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition and a(7) corrected by Colin Barker, Sep 01 2014
More terms from Jinyuan Wang, Feb 24 2020
STATUS
approved