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.

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~

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

A070971 a(n) is the smallest positive integer m for which A070194(m) (i.e., the maximal gap in {k|gcd(k,m) = 1, 1 <= k <= m-1}) is n.

Original entry on oeis.org

3, 4, 15, 6, 105, 30, 1155, 770, 36465, 210, 15015, 6006, 255255, 2310, 8580495, 102102, 4849845, 72930, 20056049013, 74364290, 5898837945, 30030, 3234846615, 881790, 195282582495, 510510, 218257003965, 20281170, 100280245065, 17160990, 934482952262145, 6614136163635
Offset: 1

Views

Author

John W. Layman, May 17 2002

Keywords

Comments

a(n) is the least x such that maximal gap in RRS of x equals n: a(n) = max{x: A070194(x) = n}
For n > 2, same as A128759, which gives the least k such that the Jacobsthal function A048669(k) equals n. See A128759 for more comments. - T. D. Noe, Mar 28 2007

Examples

			A070194 begins with 1,2,1,4,... with offset 3, so a(4)=6.
		

Crossrefs

Programs

  • Mathematica
    gw[x_] := Table[GCD[w, x], {w, 1, x}] rrs[x_] := Flatten[Position[gw[x], 1]] dr[x_] := Delete[RotateLeft[rrs[x]]-rrs[x], -1] t=Table[0, {25}]; Do[s=Max[dr[n]]; If[s<26&&t[[s]]==0, t[[s]]=n], {n, 3, 10000}]; t (* Labos Elemer, Oct 09 2002 *)

Extensions

a(13)-a(18) from T. D. Noe, Mar 28 2007
a(19) onwards from Don Reble, Oct 17 2013

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

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

Showing 1-6 of 6 results.