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

A257718 a(n) = smallest prime not included earlier such that a(n) + a(n-1) + a(n-2) is a prime and is of opposite index parity to a(n-1), beginning with a(1) = 3 and a(2) = 5.

Original entry on oeis.org

3, 5, 29, 67, 7, 23, 13, 11, 19, 17, 37, 47, 43, 41, 53, 73, 71, 83, 79, 31, 89, 59, 163, 109, 101, 97, 113, 103, 61, 149, 107, 127, 139, 167, 151, 191, 181, 137, 131, 211, 199, 197, 173, 277, 193, 257, 223, 179, 229, 233, 239, 367, 251, 241, 281, 307, 271, 389, 293, 157
Offset: 1

Views

Author

Robert G. Wilson v, May 05 2015

Keywords

Comments

Is a rearrangement of A065091.
Another sequence can be created by reversing the beginning two terms. It would begin: 5, 3, 11, 29, 31, 7, 23, 13, 17, 37, ..., .
A third sequence could have a(1) = 5 and a(2) = 11 (motivated from A257717). The sequence starts: 5, 11, 3, 17, 53, 31, 13, 23, 7, 41 ... . Do any two initial odd primes generate a rearrangement of A065091? - Derek Orr, May 13 2015

Examples

			a(3) = 29 since a(1)+a(2) is 8 and 29 whose index is 10 and is of opposite parity to 5, whose index being 3 is odd, is the first prime which meets the criteria. 8 + 11 = 19, a prime see A073653(3), but the prime index of 11 is 5 and is of the same parity as the prime index of 5 and therefore cannot be used.
		

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = NextPrime[2, Mod[PrimePi@ s[[-1]], 2]]}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q, 2]]; Append[s, q]]; Nest[f, {3, 5}, 58]
  • PARI
    v=[3,5];n=1;while(n<100,p=prime(n);if((primepi(v[#v])-n)%2&&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.