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

A071200 Primes which do not appear in A071196.

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 19, 29, 37, 43, 47, 53, 61, 67, 73, 79, 89, 103, 107, 113, 137, 139, 149, 151, 157, 163, 167, 179, 181, 191, 193, 197, 227, 229, 233, 239, 241, 257, 271, 277, 281, 283, 293, 307, 313, 317, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397
Offset: 1

Views

Author

Labos Elemer, May 16 2002

Keywords

Crossrefs

Cf. A071200.

A071199 Possible primes appearing in A071196 as certain sums of previous consecutive primes. See A071196.

Original entry on oeis.org

5, 23, 31, 41, 59, 71, 83, 97, 101, 109, 127, 131, 173, 199, 211, 223, 251, 263, 269, 311, 331, 349, 421, 431, 439, 457, 479, 487, 503, 587, 607, 647, 661, 683, 701, 719, 733, 757, 811, 827, 829, 857, 883, 911, 941, 991, 1033
Offset: 1

Views

Author

Labos Elemer, May 16 2002

Keywords

Crossrefs

A071194 Length (>1) of shortest sequence of consecutive primes starting with prime(n) whose sum is also prime, or -1 if no such sequence exists.

Original entry on oeis.org

2, 9, 3, 3, 3, 5, 3, 3, 3, 3, 3, 9, 3, 5, 7, 3, 5, 3, 3, 3, 5, 3, 3, 7, 7, 3, 7, 5, 3, 5, 5, 9, 5, 3, 3, 5, 3, 3, 11, 9, 5, 21, 5, 9, 3, 9, 3, 5, 55, 3, 7, 27, 9, 27, 7, 5, 5, 3, 9, 3, 3, 3, 5, 3, 7, 7, 11, 3, 3, 3, 5, 5, 7, 7, 3, 5, 3, 9, 3, 3, 5, 11, 3, 5, 47, 5, 3, 3, 5, 3, 3, 5, 7, 3, 3, 7, 3, 5, 5, 5, 3
Offset: 1

Views

Author

Labos Elemer, May 16 2002

Keywords

Examples

			For n=1, start-prime = prime(1) = 2, 2+3=5 is prime, length=2, so a(1)=2;
for n=2, start-prime = prime(2) = 3, 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 127 is prime, length=9, all shorter partial sums are composite, so a(2)=9;
for n=160, prime(160) = 941, 941 + ... + 1609 = 121123 is prime, a(160)=95.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 2; While[CompositeQ@ Total@ Prime@ Range[n, n + k], k++]; k + 2 Boole[EvenQ@ k] - 1, {n, 120}] (* Michael De Vlieger, Jan 01 2017 *)
  • PARI
    a(n,p=prime(n))=my(q=p,t=2); while(!isprime(p+=q=nextprime(q+1)),t++);t
    apply(p->a(0,p), primes(30)) \\ Charles R Greathouse IV, Jun 16 2015

Extensions

Escape clause added by N. J. A. Sloane, Nov 17 2020

A071195 Final prime in sequence of primes starting with prime(n) and having prime sum (see A071194), or -1 if no such sequence exists.

Original entry on oeis.org

3, 29, 11, 13, 17, 29, 23, 29, 31, 37, 41, 71, 47, 61, 73, 61, 73, 71, 73, 79, 97, 89, 97, 113, 127, 107, 137, 131, 127, 139, 149, 173, 157, 151, 157, 173, 167, 173, 227, 223, 197, 293, 211, 239, 211, 251, 227, 239, 563, 239, 269, 397, 283, 409, 283, 281, 283
Offset: 1

Views

Author

Labos Elemer, May 16 2002

Keywords

Comments

The length of the sequence is given in A071194.

Examples

			n=2: p(2)=3, 3+7+11+13+17+19+23+29 = 127 is the shortest partial sum with initial prime 3; it ends with p(10) = 29 = a(2);
n=6: p(6)=13, 13+17+19+23+29 = 101, so the end-prime = a(6) = 29.
		

Crossrefs

Programs

  • Mathematica
    Prime@ Table[k = 1; While[! PrimeQ@ Total@ Prime@ Range[n, n + k], k++]; n + k, {n, 57}] (* Michael De Vlieger, Mar 25 2017 *)
  • PARI
    a(n,p=prime(n))=my(q=p); while(!isprime(p+=q=nextprime(q+1)),);q
    apply(p->a(0,p), primes(30)) \\ Charles R Greathouse IV, Jun 16 2015

Extensions

Edited and escape clause added by N. J. A. Sloane, Nov 17 2020

A071198 Impossible primes in A071195. These primes are not terminal primes of shortest consecutive prime sequences initiated with n-th prime and providing prime-sum.

Original entry on oeis.org

2, 5, 7, 19, 43, 53, 59, 67, 83, 101, 103, 109, 163, 179, 181, 191, 193, 199, 229, 233, 241, 257, 263, 271, 277, 313, 337, 347, 367, 373, 431, 433, 449, 467, 491, 499, 521, 541, 547, 571, 587, 607, 613, 619, 643, 659, 683, 701
Offset: 1

Views

Author

Labos Elemer, May 16 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Complement[Prime@ Range@ PrimePi@ Last@ #, #] &@ Prime@ Table[k = 1; While[! PrimeQ@ Total@ Prime@ Range[n, n + k], k++]; n + k, {n, 125}] (* Michael De Vlieger, Jul 18 2017 *)

A248498 The smallest number of consecutive primes beginning with prime(n+1) added to prime(n) necessary to produce another prime.

Original entry on oeis.org

1, 8, 2, 2, 2, 4, 2, 2, 2, 2, 2, 8, 2, 4, 6, 2, 4, 2, 2, 2, 4, 2, 2, 6, 6, 2, 6, 4, 2, 4, 4, 8, 4, 2, 2, 4, 2, 2, 10, 8, 4, 20, 4, 8, 2, 8, 2, 4, 54, 2, 6, 26, 8, 26, 6, 4, 4, 2, 8, 2, 2, 2, 4, 2, 6, 6, 10, 2, 2, 2, 4, 4, 6, 6, 2, 4, 2, 8, 2, 2, 4, 10, 2, 4, 46
Offset: 1

Views

Author

Gil Broussard, Oct 07 2014

Keywords

Comments

Records are a(1) = 1, a(2) = 8, a(39) = 10, a(42) = 20, a(49) = 54, a(110) = 56, a(160) = 94, a(3070) = 158, a(13528) = 204, a(34721) = 216, a(391862) = 222, a(448696) = 298, a(651511) = 348, a(9776339) = 382, .... Assuming the sequence exists for all n it is unbounded so there are infinitely many records. - Charles R Greathouse IV, Oct 21 2014

Examples

			a(1)=1 because 2+3=5 which is prime (only 1 prime added to 2 to get a prime).
a(2)=8 because 3+5+7+11+13+17+19+23+29=127 which is prime (8 consecutive primes added to 3), and all of the partial sums are composite.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p = prime(n), q = nextprime(p+1), s = p+q, nb = 1); while (! isprime(s), p=q; q=nextprime(p+1); s += q; nb++); nb; \\ Michel Marcus, Oct 07 2014
Showing 1-6 of 6 results.