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

A073654 A073653 is defined to be 'rearrangement of odd primes such that sum of three consecutive terms is a prime'. This is the sequence of those primes whose relative position is not disturbed in this rearrangement.

Original entry on oeis.org

3, 5, 13, 17, 29, 31, 37, 41, 67, 71, 73, 79, 97, 101, 151, 173, 199, 263, 313, 421, 463, 499, 593, 659, 661, 811, 883, 977, 1069, 1093, 1151, 1193, 1201, 1217, 1307, 1321, 1399, 1777, 1847, 1871, 1913, 1993, 2011, 2029, 2053, 2137, 2239, 2273, 2287, 2377
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2002

Keywords

Crossrefs

Cf. A073653.

Extensions

More terms from Sascha Kurz, Jan 28 2003

A107896 Position of n-th odd prime in A073653.

Original entry on oeis.org

1, 2, 4, 3, 5, 6, 8, 7, 9, 10, 11, 12, 14, 16, 13, 17, 15, 18, 19, 20, 21, 23, 22, 24, 25, 27, 29, 26, 31, 32, 36, 28, 30, 33, 35, 34, 38, 37, 39, 41, 42, 44, 49, 43, 45, 40, 46, 57, 48, 51, 47, 53, 50, 60, 55, 54, 62, 52, 65, 61, 58, 56, 69, 64, 66, 67, 59, 77, 68, 63, 70, 79
Offset: 1

Views

Author

Zak Seidov, May 26 2005

Keywords

Comments

Cf. A073653 a(n)=smallest prime not included earlier such that a(n-2) + a(n-1) + a(n) is a prime. Is A073653 a permutation of odd primes?

Crossrefs

A076990 a(1) = 1, a(2) = 2; thereafter a(n) = smallest number not occurring earlier such that the sum of three successive terms is prime.

Original entry on oeis.org

1, 2, 4, 5, 8, 6, 3, 10, 16, 11, 14, 12, 15, 20, 18, 9, 26, 24, 17, 30, 32, 21, 36, 22, 13, 38, 28, 7, 44, 46, 19, 42, 40, 25, 48, 34, 27, 52, 58, 29, 50, 60, 39, 64, 54, 31, 66, 70, 37, 56, 74, 33, 72, 62, 23, 78, 80, 35, 76, 68, 47, 82, 94, 51, 84, 88, 55, 86, 92, 45, 90, 98
Offset: 1

Views

Author

Amarnath Murthy, Oct 25 2002

Keywords

Comments

a(n) = n only for n: 1, 2, 6, 12 for all n < 10000. - Robert G. Wilson v, Nov 21 2012
a(n) = ~(1 +- 2/5)*n. - Robert G. Wilson v, Nov 21 2012
a(n) is odd if and only if n == 1 (mod 3). - Robert Israel, Dec 09 2015
The odd terms grow according to a(3k+1) ~ 2k and the even terms according to a(n) ~ 4n/3. - M. F. Hasler, Dec 11 2015

Examples

			After 8 and 6 the next term is 3 as 8+6+3 = 17 is a prime.
		

Crossrefs

See also A055265.

Programs

  • Maple
    N:= 200: # to get all terms before the first > N
    V:= Vector(N):
    V[1]:= 1: V[2]:= 1:
    A[1]:= 1: A[2]:= 2:
    m0:= 3: m:= 0:
    for n from 3 while m <= N do
       t:= A[n-1]+A[n-2];
       m1:= m0 + (m0+t+1 mod 2);
       for m from m1 to N by 2 do if isprime(m+t) and V[m] = 0 then
           A[n]:= m;
           V[m]:= 1;
           break;
       fi od:
       if m = m0 then
           while m0 < N and V[m0] = 1  do m0:= m0+1 od:
       fi;
    od:
    seq(A[j],j=1..n-2); # Robert Israel, Dec 09 2015
  • Mathematica
    f[s_List] := Block[{p = s[[-2]] + s[[-1]], q = 1}, While[ !PrimeQ[p + q] || MemberQ[s, q], q++]; Append[s, q]]; Nest[f, {1, 2}, 70] (* Robert G. Wilson v, Nov 21 2012 *)
  • PARI
    A076990(n,verbose=0/*=1 to print all terms*/,a=1,u=0,m=1,L=0)={for(i=2,n,verbose&&print1(a",");u+=1<M. F. Hasler, Dec 11 2015

Extensions

More terms from David Garber, Oct 30 2002

A107897 Position of n in A107896.

Original entry on oeis.org

1, 2, 4, 3, 5, 6, 8, 7, 9, 10, 11, 12, 15, 13, 17, 14, 16, 18, 19, 20, 21, 23, 22, 24, 25, 28, 26, 32, 27, 33, 29, 30, 34, 36, 35, 31, 38, 37, 39, 46, 40, 41, 44, 42, 45, 47, 51, 49, 43, 53, 50, 58, 52, 56, 55, 62, 48, 61, 67, 54, 60, 57, 70, 64, 59, 65, 66, 69, 63, 71, 74, 83
Offset: 1

Views

Author

Zak Seidov, May 26 2005

Keywords

Comments

A107897(n)=pi(A073653(n)). Is A107896 a permutation of natural numbers?

Crossrefs

Formula

a(n)=pi(A073653(n))

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

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

A198519 a(2n-1) is the first unused prime which is the sum of the two preceding terms and such that a(2n) is that sum and it is also an unused prime.

Original entry on oeis.org

3, 5, 11, 19, 7, 37, 17, 61, 23, 101, 13, 137, 29, 179, 31, 239, 41, 311, 67, 419, 71, 557, 73, 701, 47, 821, 43, 911, 59, 1013, 79, 1151, 53, 1283, 97, 1433, 83, 1613, 127, 1823, 89, 2039, 109, 2237, 113, 2459, 139, 2711, 103, 2953, 107, 3163, 163, 3433, 131, 3727, 149, 4007, 181, 4337, 173, 4691
Offset: 1

Views

Author

Robert G. Wilson v, Dec 21 2012

Keywords

Examples

			a(3) does not equal 7 since 3+5+7 which is 15 is not a prime, but the next prime, 11, meets the criteria.
		

Crossrefs

Programs

  • Mathematica
    s = {3, 5}; k = 1; While[k < 31, p = s[[-2]] + s[[-1]]; q = 7; While[ !PrimeQ[p + q] || MemberQ[s, q] || MemberQ[s, p + q], q = NextPrime@ q]; AppendTo[s, q]; AppendTo[s, p + q]; k++]; s

A219533 a(n) = smallest prime not included earlier such that a(n-4) + a(n-3) + a(n-2) + a(n-1) + a(n) is a prime, with a(1)=3, a(2)=5, a(3)=7, and a(4)=11.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Nov 21 2012

Keywords

Examples

			a(5) = 17 because 13 will not work (3 + 5 + 7 + 11 + 13 = 39) but 17 does work, with 3 + 5 + 7 + 11 + 17 = 43.
a(6) = 13 because it is the smallest prime that will produce the desired result: 5 + 7 + 11 + 17 + 13 = 53.
		

Crossrefs

Cf. A073653.

Programs

  • Mathematica
    f[s_List] := Block[{p = s[[-4]] + s[[-3]] + s[[-2]] + s[[-1]], q = 13}, While[ !PrimeQ[p + q] || MemberQ[s, q], q = NextPrime[q]]; Append[s, q]]; Nest[f, {3, 5, 7, 11}, 56]

A219674 a(n) = smallest prime not included earlier such that a(n-4) + a(n-3) + a(n-2) + a(n-1) + a(n) is a prime, with a(1)=1, a(2)=3, a(3)=5, and a(4)=7.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Nov 28 2012

Keywords

Crossrefs

Cf. A073653.

Programs

  • Mathematica
    f[s_List] := Block[{pn = s[[-4]] + s[[-3]] + s[[-2]] + s[[-1]], p = 2}, While[ MemberQ[s, p] || ! PrimeQ[p + pn], p = NextPrime@ p]; Append[s, p]]; Nest[f, {1, 3, 5, 7}, 55]
Showing 1-10 of 10 results.