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-5 of 5 results.

A103514 a(n) is the smallest m such that primorial(n)/2 - 2^m is prime.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 25, 2, 1, 6, 6, 19, 1, 13, 3, 3, 11, 29, 2, 1, 6, 3, 4, 2, 6, 4, 15, 6, 4, 20, 4, 1, 7, 16, 4, 7, 22, 3, 12, 13, 9, 35, 2, 3, 3, 52, 35, 3, 32, 15, 13, 10, 53, 56, 9, 16, 36, 5, 8, 5, 22, 3, 14, 2, 64, 37, 8, 22, 42, 11, 22, 22, 12, 11, 26, 1, 54, 187, 20, 9
Offset: 2

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Examples

			P(2)/2-2^0=2 is prime, so a(2)=0;
P(10)/2-2^3=3234846607 is Prime, so a(10)=3.
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^8192; npd = 1; n = 2; npd = npd*Prime[n]; While[npd < nmax, tn = 1; tt = 2; cp = npd - tt; While[(cp > 1) && (! (PrimeQ[cp])), tn = tn + 1; tt = tt*2; cp = npd - tt]; If[cp < 2, Print["*"], Print[tn]]; n = n + 1; npd = npd*Prime[n]]
    (* Second program: *)
    k = 1; a = {}; Do[k = k*Prime[n]; m = 1; While[ ! PrimeQ[k - 2^m], m++ ]; Print[m]; AppendTo[a, m], {n, 2, 200}]; a (* Artur Jasinski, Apr 21 2008 *)
  • PARI
    a(n)=my(t=prod(i=2,n,prime(i)),m); while(!isprime(t-2^m),m++); m \\ Charles R Greathouse IV, Apr 28 2015

Extensions

Edited by N. J. A. Sloane, May 16 2008 at the suggestion of R. J. Mathar

A139460 a(n) = m such that 2*prime(n+m+1) + (product of n successive odd primes) is prime.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 3, 1, 1, 2, 1, 1, 9, 2, 7, 21, 7, 25, 4, 3, 18, 7, 4, 7, 11, 5, 1, 1, 61, 5, 20, 6, 22, 16, 11, 17, 1, 70, 6, 5, 5, 22, 9, 52, 108, 16, 1, 32, 42, 15, 5, 66, 6, 8, 3, 38, 17, 4, 23, 93, 8, 16, 6, 1, 39, 7, 9, 10, 21, 57, 40, 2, 15, 39, 16, 7, 5, 13, 138, 95, 58, 8, 47, 11, 39
Offset: 1

Views

Author

Artur Jasinski, Apr 22 2008; definition corrected May 09 2008

Keywords

Comments

Or, a(n) = m such that primorial(n+1)/2+2*prime(n+m+1) is prime.
For positions of 1's in this sequence see A139461

Crossrefs

Programs

  • Mathematica
    k = 1; a = {}; Do[k = k*Prime[n]; m = 1; While[ ! PrimeQ[k + 2*Prime[n + m]], m++ ]; Print[m]; AppendTo[a, m], {n, 2, 200}]; a (*Artur Jasinski*)

A139462 a(n) = m such that product n successive odd primes - 2*prime(n+m+1) is prime = such m that primorial(n+1)/2 - 2*prime(n+m+1) is prime.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 2, 2, 3, 1, 6, 5, 5, 7, 1, 5, 8, 2, 10, 29, 3, 7, 10, 8, 33, 28, 11, 3, 19, 5, 12, 12, 11, 19, 52, 29, 17, 23, 29, 36, 3, 1, 7, 59, 16, 5, 4, 113, 1, 8, 16, 25, 4, 5, 52, 1, 82, 71, 14, 34, 20, 3, 1, 35, 20, 107, 14, 38, 41, 34, 14, 6, 20, 36, 36, 20, 62, 19, 8, 92, 140
Offset: 1

Views

Author

Artur Jasinski, Apr 22 2008

Keywords

Comments

For indices where 1 occurs, see A139463.

Crossrefs

Programs

  • Mathematica
    k = 1; a = {}; Do[k = k*Prime[n]; m = 1; While[ ! PrimeQ[k - 2*Prime[n + m]], m++ ]; Print[m]; AppendTo[a, m], {n, 2, 200}]; a (*Artur Jasinski*)

A139461 Numbers k such that 2*prime(k+2) + product (first k odd primes) is prime, i.e., k such that primorial(k+1)/2 + 2*prime(k+2) is prime.

Original entry on oeis.org

1, 2, 3, 4, 8, 9, 11, 12, 27, 28, 37, 47, 64, 321, 415, 1222, 1649, 2937, 3600, 6149, 12481
Offset: 1

Views

Author

Artur Jasinski, Apr 22 2008

Keywords

Comments

a(22) > 25000. - Robert Price, Aug 06 2017

Crossrefs

Programs

  • Mathematica
    k = 1; a = {}; Do[k = k*Prime[n]; If[PrimeQ[k + 2*Prime[n + 1]], AppendTo[a, n - 1]], {n, 2, 2000}]; a (* Artur Jasinski *)

Extensions

a(16)-a(21) from Robert Price, Aug 06 2017

A139463 Numbers n such that (product of the first n odd primes) - 2*prime(n+2) is a prime.

Original entry on oeis.org

3, 4, 6, 10, 15, 42, 49, 56, 63, 106, 170, 182, 246, 255, 507, 627, 848, 864, 961, 1302, 3209, 4994, 7665, 7671, 16405
Offset: 1

Views

Author

Artur Jasinski, Apr 22 2008

Keywords

Comments

a(26) > 25000. - Robert Price, Sep 27 2017

Examples

			3 is in the sequence because 3*5*7 - 2*11 = 83 is a prime.
		

Crossrefs

Programs

  • Mathematica
    k = 1; a = {}; Do[k = k*Prime[n]; If[PrimeQ[k - 2*Prime[n + 1]], AppendTo[a, n - 1]], {n, 2, 2000}]; a
  • PARI
    isok(n) = isprime(prod(k=2, n+1, prime(k)) - 2*prime(n+2)); \\ Michel Marcus, Sep 27 2017

Extensions

Edited by Jens Kruse Andersen, May 03 2008
a(15)-a(25) from Robert Price, Sep 27 2017
Showing 1-5 of 5 results.