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

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 *)

A071197 Possible prime values in A071195.

Original entry on oeis.org

3, 11, 13, 17, 23, 29, 31, 37, 41, 47, 61, 71, 73, 79, 89, 97, 107, 113, 127, 131, 137, 139, 149, 151, 157, 167, 173, 197, 211, 223, 227, 239, 251, 269, 281, 283, 293, 307, 311, 317, 331, 349, 353, 359, 379, 383, 389, 397, 401, 409, 419, 421, 439, 443, 457
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

A071196 The sum of the sequence starting with prime(n) and having prime sum defined in A071194, or -1 if no such sequence exists.

Original entry on oeis.org

5, 127, 23, 31, 41, 101, 59, 71, 83, 97, 109, 479, 131, 263, 431, 173, 331, 199, 211, 223, 421, 251, 269, 719, 757, 311, 827, 587, 349, 647, 683, 1367, 733, 439, 457, 811, 487, 503, 2141, 1747, 941, 5009, 991, 1951, 607, 2053, 661, 1151, 21139, 701, 1753
Offset: 1

Views

Author

Labos Elemer, May 16 2002

Keywords

Examples

			n=25: prime(25)=97, sum=97+101+103+107+109+113+127=757=a(25), prime; shorter (length>1) partial sums are composite: {97,198,301,408,517,630,757}.
		

Crossrefs

Programs

  • Mathematica
    Table[sm = Prime[k] + Prime[k + 1]; g = 1; While[ ! PrimeQ[sm], g++; sm = sm + Prime[k + g]]; sm, {k, 1, 51}] (* Lei Zhou, Dec 02 2005 *)
  • PARI
    { forprime (p=2, prime(51), s=p; forprime (q=p+1, oo, if (isprime(s+=q), print1 (s", "); break))) } \\ Rémy Sigrist, Nov 17 2020

Extensions

Edited and escape clause added by N. J. A. Sloane, Nov 17 2020~
Showing 1-4 of 4 results.