login
A245811
Number of primes of the form k^(n+1) - n^k for some k > 1.
1
1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2
OFFSET
1,22
COMMENTS
The search radius for k is effectively limited to k<=n+1 because the subtracted term n^k has exponential growth and the added term k^(n+1) only polynomial growth as k increases. - R. J. Mathar, Sep 07 2014
LINKS
Juri-Stepan Gerasimov, Table of n, a(n) for n = 1..78
MAPLE
A245811 := proc(n)
local a, k, p ;
a := 0 ;
for k from 2 to n+1 do
p := k^(n+1)-n^k ;
if isprime(p) then
a := a+1 ;
end if;
end do:
a ;
end proc:
seq(A245811(n), n=1..120) ; # R. J. Mathar, Sep 07 2014
PROG
(PARI) a(n) = if(n==1, return(1)); my(k=2, c=0, t); while((t=k^(n+1)-n^k)>0, k++; if(isprime(t), c++)); c
vector(80, n, a(n)) \\ Colin Barker, Aug 26 2014
CROSSREFS
Cf. A245809.
Sequence in context: A348264 A127282 A138954 * A258822 A353373 A064530
KEYWORD
nonn
AUTHOR
STATUS
approved