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

A173972 Primes which are not in A173970 or A173971.

Original entry on oeis.org

11, 31, 37, 41, 43, 61, 67, 71, 83, 89, 97, 101, 107, 127, 131, 137, 139, 151, 163, 167, 179, 181, 191, 193, 199, 251, 271, 277, 281, 293, 307, 311, 313, 317, 331, 347, 359, 367, 379, 383, 389, 397, 401, 421, 431, 433, 443, 449, 457, 461, 463, 467, 479, 487
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[2*p-Prime[n+1]], AppendTo[lst,p]], {n,8!}]; lst1=lst; lst={}; Do[p=Prime[n]; If[PrimeQ[2*p+Prime[n+1]], AppendTo[lst,p]],{n,8!}]; lst2=lst; Complement[Prime[Range[200]], lst1, lst2]

A181848 Consider two consecutive primes {p,q} such that P=2p+q and Q=2q+p are both prime. Sequence gives lesser primes p.

Original entry on oeis.org

3, 5, 13, 59, 103, 113, 223, 241, 269, 337, 491, 773, 787, 823, 911, 919, 1571, 1637, 1723, 1879, 1949, 2089, 2423, 2521, 2753, 2953, 2971, 2999, 3011, 3137, 3361, 3571, 3739, 4231, 4363, 4663, 4909, 5791, 5903, 6221, 6359, 6793, 7043, 7507, 7873, 9323, 9403
Offset: 1

Views

Author

Zak Seidov, Aug 18 2012

Keywords

Comments

Note that Q-P=q-p and {P,Q} are not necessarily consecutive primes.

Examples

			a(1)=3 because p=3, q=5 and P=11 and Q=13 are both prime
a(3)=13 because p=13, q=17 and P=43 and Q=47 are both prime.
		

Crossrefs

Intersection of A173971 and A175914. - Zak Seidov, Mar 04 2016

Programs

  • Mathematica
    a=2;Reap[Do[b=Prime[n];If[PrimeQ[2*a+b]&&PrimeQ[2*b+a],Sow[a]];a=b,{n,2,200}]][[2,1]]
    Select[Partition[Prime[Range[1200]],2,1],AllTrue[{2 #[[1]]+#[[2]],2 #[[2]]+#[[1]]},PrimeQ]&][[;;,1]] (* Harvey P. Dale, Mar 24 2025 *)
  • PARI
    isok(p) = isprime(p) && (q=nextprime(p+1)) && isprime(p+2*q) && isprime(q+2*p); \\ Michel Marcus, Mar 05 2016

A114265 Smallest prime p greater than prime(n) such that 2*prime(n) + p is a prime.

Original entry on oeis.org

3, 5, 7, 17, 19, 17, 19, 23, 37, 31, 41, 53, 67, 53, 73, 61, 61, 71, 89, 97, 83, 83, 97, 103, 113, 109, 107, 139, 113, 127, 167, 139, 157, 179, 151, 197, 173, 173, 223, 211, 199, 239, 211, 227, 199, 233, 239, 227, 229, 233, 277, 241, 251, 271, 283, 271, 271, 281
Offset: 1

Views

Author

Lei Zhou, Nov 20 2005

Keywords

Comments

Note that p is next prime after prime(n) iff prime(n) is a term in A173971. - Zak Seidov, Feb 11 2015

Examples

			n=1: 2*prime[1]+3=2*2+3=7 is prime, so a(1)=3;
n=2: 2*prime[2]+5=2*3+5=11 is prime, so a(2)=5;
...
n=4: 2*prime[4]+3=2*7+3=17 is prime, so a(4)=17.
		

Crossrefs

Programs

  • Haskell
    a114265 n = head [p | let (q:qs) = drop (n - 1) a000040_list, p <- qs,
                          a010051 (2 * q + p) == 1]
    -- Reinhard Zumkeller, Oct 31 2013
    
  • Mathematica
    Table[p1 = Prime[n1]; n2 = 1; p2 = Prime[n1 + n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; p2, {n1, 1, 200}]
  • PARI
    a(n)=forprime(p=prime(n)+1,,if(isprime(2*prime(n)+p),return(p)))
    vector(100,n,a(n)) \\ Derek Orr, Feb 11 2015

Extensions

Edited definition to conform to OEIS style. - Reinhard Zumkeller, Oct 31 2013

A175893 Numbers m such that 2*prime(m)+prime(m+1) is prime.

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 10, 17, 22, 27, 29, 30, 35, 45, 48, 49, 50, 52, 53, 57, 61, 68, 70, 80, 81, 85, 94, 104, 106, 117, 120, 125, 126, 127, 131, 132, 136, 137, 138, 143, 146, 156, 157, 166, 177, 191, 198, 206, 220, 223, 224, 225, 233, 236, 244, 248, 254, 259, 261, 262
Offset: 1

Views

Author

Zak Seidov, Oct 10 2010

Keywords

Crossrefs

Cf. A000040 The prime numbers.
A173971 Primes p such that 2*p+NextPrime are prime numbers.
A000720 pi(n), the number of primes <= n.

Programs

  • Mathematica
    Select[Range[300],PrimeQ[2Prime[#]+Prime[#+1]]&] (* Harvey P. Dale, Apr 05 2025 *)
  • PARI
    {my(a=2);for(n=1,1000,my(b=nextprime(a+1));isprime(2*a+b)&print1(n,", ");a=b)}

Formula

a(n) = pi(A173971(n))=A000720(A173971(n)).

A255694 Primes p such that five iterations of the map p->2p+nextprime(p) give primes.

Original entry on oeis.org

1538419, 3662941, 10835789, 11698837, 13441633, 16002521, 19039199, 28598753, 29170307, 57766903, 58309837, 60324577, 71197453, 75817459, 84834049, 86506051, 127779919, 130415413, 184465669, 189978779, 221705713, 230700227, 231203779, 239519327, 255285439
Offset: 1

Views

Author

Zak Seidov, Mar 15 2015

Keywords

Comments

Apparently there is no limit for number of iterations of the map p->2p+nextprime(p) all giving primes.
E.g., first primes with 6 iterations all giving primes are 1854811727,1988791547,2498711497,2866433161,3337303943,3514209079.

Examples

			p=1538419, q=2p+np(p)=4615267, r=2q+np(q)=13845817, s=2r+np(r)=41537491, t=2s+np(s)=124612483, u=2t+np(t)=373837459 all prime, while v=2u+np(u)=1121512407=3*23*89*182627 is not prime; here np(m) = A151800(m) = next prime after m.
		

Crossrefs

Subsequence of A173971. Cf. A151800.

Programs

  • Mathematica
    fimQ[p_]:=AllTrue[NestList[2#+NextPrime[#]&,p,5],PrimeQ]; Select[Prime[Range[ 13960000]],fimQ] (* Harvey P. Dale, Oct 09 2023 *)
Showing 1-5 of 5 results.