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.

A238776 Primes p with prime(p) - p + 1 and prime(q) - q + 1 both prime, where q = prime(2*pi(p)+1) with pi(.) given by A000720.

Original entry on oeis.org

2, 5, 7, 13, 31, 41, 43, 83, 109, 151, 211, 281, 307, 317, 349, 353, 499, 601, 709, 757, 883, 911, 971, 1447, 1453, 1483, 1531, 1801, 2053, 2281, 2819, 2833, 3163, 3329, 3331, 3881, 3907, 4051, 4243, 4447, 4451, 4703, 4751, 5483, 5659, 5701, 5737, 6011, 6271, 6311, 6361, 6379, 6427, 6571, 6827, 6841, 6983, 7159, 7879, 8209
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: The sequence has infinitely many terms.
This is motivated by the conjecture in A238766. Note that the sequence is a subsequence of A234695.

Examples

			a(1) = 2 since prime(2) - 2 + 1 = 2 and prime(prime(2*pi(2)+1)) - prime(2*pi(2)+1) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 are both prime.
		

Crossrefs

Programs

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

A238878 a(n) = |{0 < k <= n: prime(prime(k)) - prime(k) + 1 and prime(prime(k*n)) - prime(k*n) + 1 are both prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 4, 5, 19, 77.
(ii) For any integer n > 0, there is a number k among 1, ..., n such that 2*k + 1 and prime(prime(k^2*n)) - prime(k^2*n) + 1 are both prime.

Examples

			a(5) = 1 since prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 and prime(prime(4*5)) - prime(4*5) + 1 = prime(71) - 71 + 1 = 353 - 70 = 283 are both prime.
a(77) = 1 since prime(prime(3)) - prime(3) + 1 = prime(5) - 5 + 1 = 11 - 4 = 7 and prime(prime(3*77)) - prime(3*77) + 1 = prime(1453) - 1453 + 1 = 12143 - 1452 = 10691 are both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]-n+1]
    p[k_,n_]:=PQ[Prime[k]]&&PQ[Prime[k*n]]
    a[n_]:=Sum[If[p[k,n],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A238814 Primes p with prime(p) - p + 1 and prime(q) - q + 1 both prime, where q is the first prime after p.

Original entry on oeis.org

2, 3, 5, 13, 41, 83, 199, 211, 271, 277, 293, 307, 349, 661, 709, 743, 751, 823, 907, 1117, 1447, 1451, 1741, 1747, 2203, 2371, 2803, 2819, 2861, 2971, 3011, 3251, 3299, 3329, 3331, 3691, 3877, 4021, 4027, 4049, 4051, 4093, 4129, 4157, 4447, 4513, 4549, 4561, 4751, 4801, 5179, 5479, 5519, 5657, 5813, 6007, 6011, 6571, 7057, 7129
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: The sequence is infinite, in other words, A234695 contains infinitely many consecutive prime pairs prime(k) and prime(k+1).
This is motivated by the comments in A238766 and A238776, and the sequence is a subsequence of A234695.

Examples

			a(1) = 2 since prime(2) - 2 + 1 = 3 - 1 = 2 and prime(3) - 3 + 1 = 5 - 2 = 3 are both prime.
a(2) = 3 since prime(3) - 3 + 1 = 5 - 2 = 3 and prime(5) - 5 + 1 = 11 - 4 = 7 are both prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_]:=PrimeQ[Prime[Prime[k]]-Prime[k]+1]
    n=0
    Do[If[p[k]&&p[k+1],n=n+1;Print[n," ",Prime[k]]],{k,1,914}]
    Select[Prime[Range[1000]],AllTrue[{Prime[#]-#+1,Prime[NextPrime[#]]-NextPrime[ #]+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    step(p,k)=k++;while(k--,p=nextprime(p+1)); p
    p=0;forprime(r=2,1e6,if(isprime(p++) && isprime(r-p+1), q=nextprime(p+1); if(isprime(step(r,q-p)-q+1), print1(p", ")))) \\ Charles R Greathouse IV, Mar 06 2014

A237715 Number of ordered ways to write n = p + q (q > 0) with p, prime(p) - p + 1 and prime(prime(q)) - prime(q) + 1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3.

Examples

			a(3) = 1 since 3 = 2 + 1 with 2, prime(2) - 2 + 1 = 3 - 1 = 2 and prime(prime(1)) - prime(1) + 1 = prime(2) - 2 + 1  = 2 all prime.
a(7) = 2 since 7 = 3 + 4 with 3, prime(3) - 3 + 1 = 5 - 2 = 3 and prime(prime(4)) - prime(4) + 1 = prime(7) - 7 + 1 = 17 - 6 = 11 are all prime, and 7 = 5 + 2 with 5, prime(5) - 5 + 1 = 11 - 4 = 7 and prime(prime(2)) - prime(2) + 1 = prime(3) - 3 + 1 = 5 - 2 = 3 all prime.
		

Crossrefs

Programs

  • Mathematica
    pq[k_]:=PrimeQ[Prime[Prime[k]]-Prime[k]+1]
    a[n_]:=Sum[If[pq[k]&&pq[n-Prime[k]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A260753 Least positive integer k such that both k and k*n belong to the set {m>0: prime(prime(m))-prime(m)+1 = prime(p) for some prime p}.

Original entry on oeis.org

2, 2, 2279, 5806, 4, 1135, 816, 6556, 725, 2, 1333, 10839, 27, 829, 2279, 2838, 3881, 6540, 2564, 2, 7830, 6540, 27, 4905, 6121, 8220, 316, 1061, 2, 14691, 2, 1168, 738, 4707, 785, 12467, 5492, 1447, 542, 538, 12840, 829, 4732, 5637, 785, 1246, 1198, 433, 58, 573, 26280, 17387, 316, 430, 1198, 4315, 4315, 1479, 4315, 1497
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 18 2015

Keywords

Comments

Conjecture: For any s and t in the set {1,-1}, every positive rational number r can be written as m/n with m and n in the set {k>0: prime(prime(k))+s*prime(k)+t = prime(p) for some prime p}.
In the case s = -1 and t = 1, the conjecture implies that A261136 has infinitely many terms.

Examples

			a(3) = 2279 since  prime(prime(2279))-prime(2279)+1 = prime(20147)-20147+1 = 226553-20146 = 206407 = prime(18503) with 18503 prime, and  prime(prime(2279*3))-prime(2279*3)+1 = prime(68777)-68777+1 = 865757-68776 = 796981 = prime(63737) with 63737 prime.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    f[n_]:=Prime[Prime[n]]-Prime[n]+1
    PQ[p_]:=PrimeQ[p]&&PrimeQ[PrimePi[p]]
    Do[k=0;Label[bb];k=k+1;If[PQ[f[k]]&&PQ[f[k*n]],Goto[aa],Goto[bb]];Label[aa];Print[n," ", k];Continue,{n,1,60}]
Showing 1-5 of 5 results.