cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A285015 Primes of the form k * b^b - 1, with b > 1.

Original entry on oeis.org

3, 7, 11, 19, 23, 31, 43, 47, 53, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 239, 251, 263, 269, 271, 283, 307, 311, 331, 347, 359, 367, 379, 383, 419, 431, 439, 443, 463, 467, 479, 487, 491, 499, 503, 523, 547
Offset: 1

Views

Author

Vincenzo Librandi, May 08 2017

Keywords

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

Examples

			a(1) = 1*(2^2)-1 = 3.
a(2) = 2*(2^2)-1 = 7.
a(9) = 2*(3^3)-1 = 53.
		

Crossrefs

Cf. A175768.

Programs

  • 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]
  • 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