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.

A236458 Primes p with p + 2 and prime(p) + 2 both prime.

Original entry on oeis.org

3, 5, 17, 41, 1949, 2309, 2711, 2789, 2801, 3299, 3329, 3359, 3917, 4157, 4217, 4259, 4637, 5009, 5021, 5231, 6449, 7757, 8087, 8219, 8627, 9419, 9929, 10007, 10937, 11777, 12071, 14321, 15647, 15971, 16061, 16901, 18131, 18251, 18287, 18539
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236470, the sequence should have infinitely many terms. This is stronger than the twin prime conjecture.
See A236457 and A236467 for similar sequences.

Examples

			a(1) = 3 since 3 + 2 = 5 and prime(3) + 2 = 7 are both prime, but 2 + 2 = 4 is composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n+2]&&PrimeQ[Prime[n]+2]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
  • PARI
    s=[]; forprime(p=2, 20000, if(isprime(p+2) && isprime(prime(p)+2), s=concat(s, p))); s \\ Colin Barker, Jan 26 2014

A236457 Primes p with q = p + 2 and prime(q) + 2 both prime.

Original entry on oeis.org

3, 5, 11, 41, 107, 311, 461, 599, 641, 1277, 1619, 1997, 2309, 2381, 2789, 3671, 4787, 5099, 6659, 6701, 6827, 7457, 7487, 8219, 8537, 8597, 9929, 10709, 11117, 12071, 12107, 12251, 13709, 17747, 18047, 18251, 18521, 22091, 22637, 23027
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236456, this sequence should have infinitely many terms.
See A236458 for a similar sequence.

Examples

			a(1) = 3 since 3 + 2 = 5 and prime(5) + 2 = 13 are both prime, but 2 + 2 = 4 is not.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n+2]&&PrimeQ[Prime[n+2]+2]
    In[2]:= n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
    Select[Prime[Range[2600]],AllTrue[{#+2,Prime[#+2]+2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 21 2021 *)
  • PARI
    s=[]; forprime(p=2, 24000, q=p+2; if(isprime(q) && isprime(prime(q)+2), s=concat(s, p))); s \\ Colin Barker, Jan 26 2014

A236097 a(n) = |{0 < k < n-2: p = phi(k) + phi(n-k)/2 + 1, prime(p) - p - 1 and prime(p) - p + 1 are all prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 3, 1, 1, 2, 2, 3, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 0, 5, 5, 2, 4, 1, 5, 3, 3, 2, 4, 4, 9, 5, 9, 4, 10, 3, 6, 6, 8, 5, 10, 4, 4, 7, 8, 10, 5, 8, 9, 9, 4, 11, 3, 5, 5, 9, 5, 4, 4, 5, 6, 8, 7, 6, 3, 11, 4, 8, 10, 9, 8, 7, 6, 11, 7, 9, 4, 6, 5, 6, 2, 9, 4, 7, 6, 7, 10, 9
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 31.
This implies that there are infinitely many primes p with {prime(p) - p - 1, prime(p) - p + 1} a twin prime pair.

Examples

			a(20) = 1 since phi(2) + phi(18)/2 + 1 = 5, prime(5) - 5 - 1 = 5 and prime(5) - 5 + 1 = 7 are all prime.
a(36) = 1 since phi(21) + phi(15)/2 + 1 = 17, prime(17) - 17 - 1 = 41 and prime(17) - 17 + 1 = 43 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]-n-1]&&PrimeQ[Prime[n]-n+1]
    f[n_,k_]:=EulerPhi[k]+EulerPhi[n-k]/2+1
    a[n_]:=Sum[If[p[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A236467 Primes p with p + 2 and prime(p) - 2 both prime.

Original entry on oeis.org

3, 11, 29, 149, 179, 191, 269, 347, 431, 461, 617, 659, 1031, 1619, 1931, 3467, 3527, 4799, 6569, 6689, 7349, 7877, 9011, 9767, 11117, 12611, 13691, 13901, 14549, 16067, 16139, 16451, 16631, 17489, 17681, 18911, 20981, 22367, 23909, 24179
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 26 2014

Keywords

Comments

According to the conjecture in A236468, this sequence should have infinitely many terms.
See A236457 and A236458 for similar sequences.

Examples

			a(1) = 3 since 3, 3 + 2 = 5 and prime(3) - 2 = 3 are all prime, but 2 + 2 = 4 is composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=PrimeQ[n+2]&&PrimeQ[Prime[n]-2]
    n=0;Do[If[p[Prime[m]],n=n+1;Print[n," ",Prime[m]]],{m,1,10000}]
    Select[Prime[Range[3000]],AllTrue[{#+2,Prime[#]-2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 11 2020 *)

A236193 Primes p with prime(p)^2 + (2*p)^2 and p^2 + (2*prime(p))^2 both prime.

Original entry on oeis.org

3, 139, 179, 233, 491, 929, 1217, 1429, 1597, 1613, 1987, 2243, 3061, 3499, 3529, 4507, 5737, 5779, 6329, 7247, 7823, 8263, 8839, 9941, 10259, 11317, 11383, 12157, 12421, 13093, 13219, 13367, 14449, 14669, 15101, 15877, 17449, 18523, 18593, 19051
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 20 2014

Keywords

Comments

By part (i) of the conjecture in A236192, this sequence should have infinitely many terms.

Examples

			a(1) = 3 since prime(2)^2 + (2*2)^2 = 25 is composite, but prime(3)^2 + (2*3)^2 = 5^2 + 6^2 = 61 and 3^2 + (2*prime(3))^2 = 3^2 + 10^2 = 109 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[Prime[n]^2+(2*n)^2]&&PrimeQ[n^2+(2*Prime[n])^2]
    n=0;Do[If[p[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,1,10^6}]

A236687 Primes p such that prime(p^2) - 2 is also prime.

Original entry on oeis.org

2, 11, 17, 47, 61, 137, 163, 229, 239, 263, 317, 389, 419, 449, 467, 557, 571, 617, 619, 653, 709, 937, 953, 1009, 1033, 1087, 1123, 1129, 1181, 1249, 1481, 1831, 1987, 2003, 2099, 2207, 2381, 2441, 2579, 2663, 2707, 3109, 3457, 3833, 4013, 4463, 4519, 4783
Offset: 1

Views

Author

K. D. Bajpai, Jan 29 2014

Keywords

Examples

			17 is prime and appears in the sequence because prime(17^2) = 1879 and 1879 - 2 = 1877, which is also prime.
47 is prime and appears in the sequence because prime(47^2) = 19471 and 19471 - 2 = 19469, which is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b,d; a:=ithprime(n); b:=ithprime(a^2)-2; if isprime (b) then RETURN (a);fi; end: seq(KD(), n=1..500);
  • PARI
    default(primelimit,2^31)
    s=[]; forprime(p=2, 5000, if(isprime(prime(p^2)-2), s=concat(s, p))); s \\ Colin Barker, Jan 30 2014

A236688 Primes p such that prime(p^2) + 2 is also prime.

Original entry on oeis.org

7, 53, 83, 107, 149, 223, 367, 509, 701, 769, 853, 971, 1039, 1229, 1283, 1327, 1373, 1381, 1439, 1447, 1459, 1783, 1873, 1973, 2237, 2243, 2269, 2339, 2347, 2437, 2459, 2521, 2531, 2797, 2857, 3001, 3391, 3413, 3461, 3583, 3593, 3631, 3659, 3769, 3889, 3947
Offset: 1

Views

Author

K. D. Bajpai, Jan 29 2014

Keywords

Examples

			7 is prime and appears in the sequence: prime(7^2) = 227 and 227+2 = 229, which is also prime.
53 is prime and appears in the sequence: prime(53^2) = 25469 and 25469+2 = 25471, which is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b; a:=ithprime(n); b:=ithprime(a^2)+2; if isprime (b) then RETURN (a);fi; end: seq(KD(), n=1..700);
  • Mathematica
    Select[Prime[Range[600]],PrimeQ[Prime[#^2]+2]&] (* Harvey P. Dale, Aug 29 2021 *)
  • PARI
    default(primelimit,2^31)
    s=[]; forprime(p=2, 4000, if(isprime(prime(p^2)+2), s=concat(s, p))); s \\ Colin Barker, Jan 30 2014

A236143 Odd primes p with prime(p-1) - (p-1) and prime(p-1) - 2*prime((p-1)/2) both prime.

Original entry on oeis.org

7, 11, 31, 67, 179, 193, 197, 281, 347, 349, 563, 599, 757, 1123, 1453, 1543, 1933, 1987, 2083, 2531, 2971, 3037, 3259, 3547, 3583, 3701, 3919, 4027, 4483, 5023, 5581, 5591, 5647, 5981, 6449, 7207, 7297, 7603, 8291, 9049
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2014

Keywords

Comments

By part (i) of the conjecture in A236138, this sequence should have infinitely many terms.

Examples

			a(1) = 7 with prime(6) - 6 = 13 - 6 = 7 and prime(6) - 2*prime(3) = 13 - 2*5 = 3 both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    p[n_]:=PrimeQ[Prime[n-1]-(n-1)]&&PQ[Prime[n-1]-2*Prime[(n-1)/2]]
    n=0;Do[If[p[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,2,10^5}]
  • PARI
    s=[]; forprime(p=3, 10000, if(isprime(prime(p-1)-(p-1)) && isprime(prime(p-1)-2*prime((p-1)/2)), s=concat(s, p))); s \\ Colin Barker, Jan 19 2014

A237423 Primes p such that prime(prime(p^2)) - 2 is also prime.

Original entry on oeis.org

13, 17, 167, 179, 211, 223, 337, 373, 541, 661, 743, 751, 1063, 1129, 1217, 1607, 1697, 1741, 1913, 2017, 2039, 2083, 2293, 2389, 2447, 2459, 2543, 2677, 2693, 2711, 2851, 2909, 3083, 3191, 3209, 3259, 3571, 3889, 3917
Offset: 1

Views

Author

K. D. Bajpai, Feb 07 2014

Keywords

Examples

			13 is prime and appears in the sequence because  prime(prime(13^2)) - 2  = 8009 which is also prime.
17 is prime and appears in the sequence because  prime(prime(17^2)) - 2  = 16139 which is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b;  a:=ithprime(n);  b:=ithprime(ithprime(a^2))-2;  if isprime (b) then RETURN (a); fi;  end: seq(KD(), n=1..500);
  • Mathematica
    p[n_] := PrimeQ[Prime[Prime[n^2]] - 2]; n = 0; Do[If[p[Prime[m]], n = n + 1; Print[n, " ", Prime[m]]], {m, 1000}] (* Bajpai *)
    Select[Prime[Range[105]], PrimeQ[Prime[Prime[#^2]] - 2] &] (* Wouter Meeussen, Feb 09 2014 *)

A238185 Primes p such that prime(prime(p^2)) + 2 is also prime.

Original entry on oeis.org

2, 23, 97, 163, 463, 491, 557, 659, 677, 977, 1033, 1151, 1187, 1429, 1439, 1511, 1579, 1663, 1933, 2111, 2113, 2141, 2381, 2969, 3301, 3491, 3803, 3929, 4201, 4421, 4447, 4513, 4547, 4789, 5039, 5273, 5281, 5303, 5309, 5449, 5669, 5741, 5939, 5981, 6053
Offset: 1

Views

Author

K. D. Bajpai, Feb 19 2014

Keywords

Examples

			23 is in the sequence because 23 is prime and prime(prime(23^2)) + 2 = 35803 is also prime.
97 is in the sequence because 97 is prime and prime(prime(97^2)) + 2 = 1269643 is also prime.
		

Crossrefs

Programs

  • Maple
    KD := proc() local a,b,d; a:=ithprime(n); b:=ithprime(ithprime(a^2))+2; if isprime (b) then RETURN (a);fi; end: seq(KD(), n=1..300);
  • Mathematica
    n=0; Do[If[PrimeQ[Prime[Prime[Prime[k]^2]]+2],n=n+1; Print[n," ",Prime[k]]], {k,1,5000}]
    Select[Prime[Range[800]],PrimeQ[Prime[Prime[#^2]]+2]&] (* Harvey P. Dale, Dec 19 2014 *)
Showing 1-10 of 10 results.