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

A235925 Primes p with q = prime(p) - p + 1 and r = prime(q) - q + 1 both prime.

Original entry on oeis.org

2, 3, 5, 17, 23, 41, 61, 83, 181, 271, 311, 337, 757, 953, 1277, 1451, 1753, 1777, 2027, 2081, 2341, 2707, 2713, 2749, 2819, 2861, 2879, 2909, 2971, 3121, 3163, 3329, 3697, 3779, 3833, 3881, 3907, 4027, 4051, 4129, 4363, 4549, 5333, 5483, 5659, 5743, 5813, 5897, 6029, 6053
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

By the conjecture in A235924, this sequence should have infinitely many terms.
Conjecture: For any integer m > 1, there are infinitely many chains p(1) < p(2) < ... < p(m) of m primes with p(k+1) = prime(p(k)) - p(k) + 1 for all 0 < k < m.

Examples

			a(1) = 2 since prime(2) - 2 + 1 = 2 is prime.
a(2) = 3 since prime(3) - 3 + 1 = 3 is prime.
a(3) = 5 since 5, prime(5) - 5 + 1 = 7 and prime(7) - 7 + 1 = 11 are all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]-n+1
    n=0;Do[If[PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]
    bpQ[n_]:=Module[{q=Prime[n]-n+1},AllTrue[{q,Prime[q]-q+1},PrimeQ]]; Select[Prime[Range[800]],bpQ](* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 07 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}]

A235934 Primes p with f(p), f(f(p)) and f(f(f(p))) all prime, where f(n) = prime(n) - n + 1.

Original entry on oeis.org

2, 3, 23, 311, 1777, 2341, 2861, 3329, 3833, 4051, 8753, 9007, 11587, 13093, 13309, 14551, 16001, 19687, 23143, 26993, 37309, 41981, 44131, 45491, 54623, 56431, 56821, 57991, 60223, 61643, 66413, 66883, 67511, 68767, 69029, 70003, 75743, 76261, 76819, 80021
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

By the general conjecture in A235925, this sequence should have infinitely many terms.

Examples

			a(3) = 23 with 23, f(23) = 61, f(61) = 223 and f(223) = 1187 all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]-n+1
    p[k_]:=PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]]&&PrimeQ[f[f[f[Prime[k]]]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]],{k,1,10000}]

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 0, 1, 0, 0, 0, 0, 2, 2, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 4, 0, 0, 1, 2, 0, 1, 2, 1, 0, 3, 4, 0, 0, 0, 2, 1, 3, 1, 2, 0
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 116.
(ii) For any integer n > 196, there is a positive integer k < n such that p = phi(k) + phi(n-k)/6 + 1, prime(2*p) - 2*prime(p) and prime(p-1) - 2*prime((p-1)/2) are all prime.
Clearly, part (i) (or part (ii)) implies that there are infinitely many odd primes p with prime(2*p) - 2*prime(p) and prime(p) - 2*prime((p-1)/2) (or prime(p-1) - 2*prime((p-1)/2), resp.) both prime.

Examples

			a(30) = 1 since phi(4) + phi(26)/6 + 1 = 5, prime(2*5) - 2*prime(5) = 29 - 2*11 = 7 and prime(5) - 2*prime((5-1)/2) = 11 - 2*3 = 5 are all prime.
a(204) = 1 since phi(159) + phi(45)/6 + 1 = 109, prime(2*109) - 2*prime(109) = 1361 - 2*599 = 163, and prime(109) - 2*prime((109-1)/2) = 599 - 2*251 = 97 are all prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 3, 0, 1, 3, 1, 4, 0, 5, 2, 2, 3, 4, 1, 4, 2, 5, 3, 1, 6, 4, 3, 0, 4, 5, 3, 3, 4, 5, 2, 4, 2, 2, 4, 3, 4, 1, 2, 2, 3, 5, 3, 0, 3, 2, 4, 1, 2, 2, 4, 0, 4, 1, 3, 3, 2, 0, 4, 1, 3, 2, 3, 1, 5, 3, 5, 1, 4, 2, 3, 5, 4, 4, 5, 4, 1, 2, 2, 3, 3, 7, 3, 2, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 73.
(ii) For any integer n > 472, there is a positive integer k < n such that p = phi(k) + phi(n-k)/4 - 1, prime(p) - 2*prime((p-1)/2) and prime(p) - 2*prime((p+1)/2) are all prime.
Clearly, part (i) of the conjecture implies that there are infinitely many odd primes p with prime(p-1) - (p-1) and prime(p-1) - 2*prime((p-1)/2) both prime, and part (ii) implies that there are infinitely many odd primes p with prime(p) - 2*prime((p-1)/2) and prime(p) - 2*prime((p+1)/2) both prime.

Examples

			a(20) = 1 since phi(11) + phi(9)/3 - 1 = 11, prime(10) - 10 = 29 - 10 = 19 and prime(10) - 2*prime(5) = 29 - 2*11 = 7 are all prime.
a(293) = 1 since phi(267) + phi(26)/3 - 1 = 176 + 12/3 - 1 = 179, prime(178) - 178 = 1061 - 178 = 883 and prime(178) - 2*prime(89) = 1061 - 2*461 = 139 are all prime.
		

Crossrefs

Programs

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

A235984 Primes p with f(p), f(f(p)), f(f(f(p))), f(f(f(f(p)))), f(f(f(f(f(p))))) all prime, where f(n) = prime(n) - n + 1.

Original entry on oeis.org

2, 3, 501187, 560029, 2076881, 2836003, 2907011, 8254787, 8822347, 10322189, 11329181, 11354641, 12307693, 14528069, 15801601, 17757427, 19023091, 24995669, 25871971
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

Comments

By the general conjecture in A235925, this sequence should have infinitely many terms.

Examples

			a(3) = 501187 with 501187, f(501187) = 6886357, f(6886357) = 113948711, f(113948711) = 2224096873, f(2224096873) =  50351471977 and f(50351471977) = 1303792228393 all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[n]-n+1
    p[k_]:=PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]]&&PrimeQ[f[f[f[Prime[k]]]]]&&PrimeQ[f[f[f[f[Prime[k]]]]]]&&PrimeQ[f[f[f[f[f[Prime[k]]]]]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",Prime[k]]],{k,1,10^7}]
Showing 1-6 of 6 results.