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.

Showing 1-2 of 2 results.

A115785 Smallest prime number p such that p - prime(1)#, p - prime(2)#, ..., p - prime(n)# are all prime, where prime(i)# is the primorial of the i-th prime (A002110(i)).

Original entry on oeis.org

5, 13, 43, 229, 3463, 43789, 1088449, 19800379, 264333259, 9348884059, 228178314439, 7931712374479, 307867708410673, 13230211614496609, 618681508598750923
Offset: 1

Views

Author

Rick L. Shepherd, Jan 31 2006

Keywords

Comments

Subset of A006512 (greater of twin primes).
Inspired by C. Rivera's Prime Curio for 313. a(4) = 229 is the smallest prime having the same property he states for 313.

Examples

			a(4) = 229 because 229, 229 - 2, 229 - 2*3, 229 - 2*3*5 and 229 - 2*3*5*7 are all prime and there is no smaller prime with this property.
		

Crossrefs

Cf. A002110, A006512, A115786 (for p + prime(i)#).

Extensions

a(10) from Don Reble, Feb 15 2006
More terms from Jens Kruse Andersen, Feb 26 2006

A257467 Smallest prime number p such that p + psq(1), p + psq(2), ... p + psq(n) are all prime but p+psq(n+1) is not. (psq(n) is the square of the primorial.)

Original entry on oeis.org

2, 3, 43, 7, 163, 397, 5527, 454543, 615883, 142516687, 68967673, 57502725253, 37520993053, 2630665498987, 39809897510563
Offset: 0

Views

Author

Fred Schneider, Apr 25 2015

Keywords

Examples

			For prime 43, 43 + 4 and 43 + 36 are prime but not 43 + 30^2.
		

Crossrefs

Programs

  • PARI
    psq(n)=my(P=1); forprime(p=2, prime(n), P*=p); P^2;
    isokpsq(p, n) = {for (k=1, n, if (!isprime(p+psq(k)), return (0));); if (!isprime(p+psq(n+1)), return (1));}
    a(n) = {p = 2; while (!isokpsq(p,n), p = nextprime(p+1)); p;} \\ Michel Marcus, May 04 2015
    
  • PARI
    allprime(v,n=0)=for(i=1,#v,if(!isprime(v[i]+n), return(0))); 1
    a(n)=if(n<2,return(n+2)); my(t=4,v=vector(n-1,i,t*=prime(i+1)^2),p=2); t*=prime(n+1)^2; forprime(q=3,, if(q-p==4 && allprime(v,p) && !isprime(t+p), return(p)); p=q) \\ Charles R Greathouse IV, May 05 2015

Extensions

a(13)-a(14) from Fred Schneider, May 16 2015
Showing 1-2 of 2 results.