OFFSET
1,1
COMMENTS
This sequence has relative density 1 - Prod_p 1-1/(p^p-p) = 0.52098749404893... in the primes, hence a(n) ~ kn log n where k = 1.91943... is the reciprocal of this quantity. - Charles R Greathouse IV, May 12 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1*(2^2)-1 = 3.
a(2) = 2*(2^2)-1 = 7.
a(9) = 2*(3^3)-1 = 53.
MAPLE
N:= 1000: # to get all terms <= N
bmax:= floor(ln(N+1)/LambertW(ln(N+1))):
sort(convert(select(isprime, {seq(seq(k*b^b-1, k=1..(N+1)/b^b), b=2..bmax)}), list)); # Robert Israel, May 11 2017
MATHEMATICA
Take[Select[Union@Flatten@Table[k b^b - 1, {b, 2, 20}, {k, 148}], PrimeQ], 55]
PROG
(PARI) upto(n)=my(l=List([3]), b=2, s=1); n++; while(b^b < n, c = b^b; forstep(i=2, n\c, s, if(isprime(i*c-1), listput(l, i*c-1))); s=3-s; b++); listsort(l, 1); l \\ David A. Corneth, May 11 2017
(PARI) is(n)=if(!isprime(n), return(0)); my(t); forprime(p=2, , t=p^p; if((n+1)%t==0, return(1)); if(t>=n, return(0))) \\ Charles R Greathouse IV, May 11 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, May 08 2017
STATUS
approved