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.

A257716 a(n) = smallest prime of even index not included earlier such that a(n) + a(n-1) + a(n-2) is a prime, beginning with a(1) = 3 and a(2) = 7.

Original entry on oeis.org

3, 7, 13, 53, 37, 19, 71, 61, 79, 89, 29, 139, 43, 101, 107, 151, 131, 181, 229, 113, 199, 251, 163, 173, 263, 223, 271, 239, 311, 193, 293, 337, 281, 349, 317, 373, 359, 397, 457, 383, 409, 421, 491, 521, 541, 557, 433, 443, 577, 463, 503, 593, 601, 673, 479, 569, 619, 613
Offset: 1

Views

Author

Robert G. Wilson v, May 05 2015

Keywords

Comments

Conjecture: The union of this sequence and A257717 is A065091.

Examples

			a(4) = 53 since a(2)+a(3) is 20 and 53, whose index equals 16, is the first even-indexed prime which meets the criteria. 20 + 11 = 31, a prime, but 11 is the 5th prime and therefore cannot be used.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = 13}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q, 2]]; Append[s, q]]; Nest[f, {3, 7}, 56]
  • PARI
    v=[3,7];n=1;while(n<100,if(isprime(v[#v]+v[#v-1]+prime(2*n))&&!vecsearch(vecsort(v),prime(2*n)),v=concat(v,prime(2*n));n=0);n++);v \\ Derek Orr, May 13 2015

A257717 a(n) is the smallest odd-indexed prime not included earlier such that a(n) + a(n-1) + a(n-2) is a prime, beginning with a(1) = 5 and a(2) = 11.

Original entry on oeis.org

5, 11, 31, 17, 23, 67, 41, 59, 73, 47, 103, 83, 97, 127, 149, 157, 137, 167, 283, 191, 179, 109, 211, 227, 313, 233, 197, 331, 241, 257, 379, 347, 307, 367, 389, 277, 353, 401, 439, 269, 509, 499, 419, 449, 571, 431, 487, 563, 461, 547, 523, 587, 599, 661, 607, 761, 631, 677
Offset: 1

Views

Author

Robert G. Wilson v, May 05 2015

Keywords

Comments

Conjecture: The union of this sequence and A257716 is A065091.

Examples

			a(3) = 31 since a(1)+a(2) is 16 and 31, whose index equals 11, is the first odd-indexed prime which meets the criteria. 16 + 7 = 23, a prime, but 7 is the 4th prime and therefore cannot be used.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = 17}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q, 2]]; Append[s, q]]; Nest[f, {5, 11}, 56]
  • PARI
    v=[5,11];n=1;while(n<100,p=prime(2*n-1);if(isprime(v[#v]+v[#v-1]+p)&&!vecsearch(vecsort(v),p),v=concat(v,p);n=0);n++);v \\ Derek Orr, May 13 2015
Showing 1-2 of 2 results.