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

A238766 Number of ordered ways to write n = k + m (k > 0 and m > 0) such that prime(prime(k)) - prime(k) + 1, prime(prime(2*k+1)) - prime(2*k+1) + 1 and prime(prime(m)) - prime(m) + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 11, 44, 55, 149, 371.
This suggests that there are infinitely many prime pairs {p, q} with 2*pi(p) + 1 = pi(q) such that prime(p) - p + 1 and prime(q) - q + 1 are both prime.

Examples

			a(3) = 1 since 3 = 1 + 2 with prime(prime(1)) - prime(1) + 1 = prime(2) - 2 + 1 = 2, prime(prime(2*1+1)) - prime(2*1+1) + 1 = prime(5) - 5 + 1 = 7 and prime(prime(2)) - prime(2) + 1 = prime(3) - 3 + 1 = 3 all prime.
a(371) = 1 since 371 = 66 + 305 with prime(prime(66)) - prime(66) + 1 = prime(317) - 317 + 1 = 2099 - 316 = 1783, prime(prime(2*66+1)) - prime(2*66+1) + 1 = prime(751) - 751 + 1 = 5701 - 750 = 4951 and prime(prime(305)) - prime(305) + 1 = prime(2011) - 2011 + 1 = 17483 - 2010 = 15473 all prime.
		

Crossrefs

Programs

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

A235330 Number of ways to write 2*n = p + q with p, q, prime(p) - p + 1 and prime(q) + q + 1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 05 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n >= 2480.
(ii) If n > 4368 then 2*n+1 can be written as 2*p + q with p and q terms of the sequence A234695.
Parts (i) and (ii) are stronger than Goldbach's conjecture (A045917) and Lemoine's conjecture (A046927) respectively.

Examples

			a(8) = 1 since 2*8 = 5 + 11 with 5, 11, prime(5) - 5 + 1 = 7 and prime(11) + 11 + 1 = 43 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_] := PrimeQ[n] && PrimeQ[Prime[n] - n + 1];
    q[n_] := PrimeQ[n] && PrimeQ[Prime[n] + n + 1];
    a[n_] := Sum[If[p[k] && q[2 n - k], 1, 0], {k, 1, 2 n - 1}];
    Table[a[n], {n, 1, 100}]

A235682 Number of ways to write n = k + m with k > 0 and m > 2 such that p = phi(k) + phi(m)/2 + 1, prime(p) - p + 1 and p*(p+1) - prime(p) are all prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 84.
Clearly, this implies that there are infinitely many primes p with prime(p) - p + 1 and p*(p+1) - prime(p) both prime.

Examples

			a(10) = 1 since 10 = 1 + 9 with phi(1) + phi(9)/2 + 1 = 5, prime(5) - 5 + 1 = 7 and 5*6 - prime(5) = 19 all prime.
a(95) = 1 since 95 = 62 + 33 with phi(62) + phi(33)/2 + 1 = 41, prime(41) - 41 + 1 = 139 and 41*42 - prime(41) = 1543 all prime.
a(421) = 1 since 421 = 289 + 132 with phi(289) + phi(132)/2 + 1 = 293, prime(293) - 293 + 1 = 1621 and 293*294 - prime(293) = 84229 all prime.
		

Crossrefs

Programs

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

A236832 Number of ways to write 2*n - 1 = p + q + r (p <= q <= r) with p, q and r terms of A234695.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 31 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
This is stronger than Goldbach's weak conjecture which was finally proved by H. A. Helfgott in 2013.

Examples

			a(4) = 1 since 2*4 - 1 = 2 + 2 + 3 with 2 and 3 terms of A234695.
a(5) = 2 since 2*5 - 1 = 2 + 2 + 5 = 3 + 3 + 3 with 2, 3, 5 terms of A234695.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[Prime[n]-n+1]
    q[n_]:=PrimeQ[n]&&p[n]
    a[n_]:=Sum[If[p[Prime[i]]&&p[Prime[j]]&&q[2n-1-Prime[i]-Prime[j]],1,0],{i,1,PrimePi[(2n-1)/3]},{j,i,PrimePi[(2n-1-Prime[i])/2]}]
    Table[a[n],{n,1,100}]

A235681 Primes p with prime(p) - p + 1 and p*(p+1) - prime(p) both prime.

Original entry on oeis.org

2, 3, 5, 41, 61, 71, 89, 271, 281, 293, 337, 499, 571, 751, 907, 911, 1093, 1531, 2027, 2341, 2707, 2861, 3011, 3359, 3391, 3511, 4133, 5179, 5189, 5483, 5573, 5657, 5867, 6577, 6827, 7159, 7411, 7753, 7879, 8179, 8467, 9209, 9391, 9419, 9433, 10259, 10303, 10859, 10993, 11287
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

This is the intersection of A234695 and A235661. For any prime p in this sequence, p^2 + 1 is the sum of the two primes prime(p) - p + 1 and p*(p+1) - prime(p).
By the conjecture in A235682, this sequence should have infinitely many terms.

Examples

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

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[Prime[n]-n+1]&&PrimeQ[n(n+1)-Prime[n]]
    n=0;Do[If[PQ[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]

A238134 Number of primes p < n with q = floor((n-p)/4) and prime(q) - q + 1 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n such that q = floor((n-p)/m) and prime(q) - q + 1 are both prime.
In the cases m = 1, 2, this gives refinements of Goldbach's conjecture and Lemoine's conjecture (see also A235189). For m > 2, the conjecture is completely new.
See also A238701 for a similar conjecture involving primes q with q^2 - 2 also prime.

Examples

			 a(29) = 3 since 7, floor((29-7)/4) = 5 and prime(5) - 5 + 1 = 11 - 4 = 7 are all prime; 17, floor((29-17)/4) = 3 and prime(3) - 3 + 1 = 5 - 2 = 3 are all prime; 19, floor((29-19)/4) = 2 and prime(2) - 2 + 1 = 3 - 1 = 2 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]-n+1]
    a[n_]:=Sum[If[PQ[Floor[(n-Prime[k])/4]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A235508 Number of ways to write 2*n = p + q with q > 0 such that p, p*(p+1) - prime(p) and prime(q) - q + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.

Examples

			a(7) = 1 since 2*7 = 11 + 3 with 11, 11*12 - prime(11) = 101 and prime(3) - 3 + 1 = 3 all prime.
a(19) = 1 since 2*19 = 37 + 1 with 37, 37*38 - prime(37) = 1249 and prime(1) - 1 + 1 = 2 all prime.
a(98) = 1 since 2*98 = 11 + 185 with 11, 11*12 - prime(11) = 101 and prime(185) - 185 + 1 = 919 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_]:=PrimeQ[Prime[k](Prime[k]+1)-Prime[Prime[k]]]
    q[m_]:=PrimeQ[Prime[m]-m+1]
    a[n_]:=Sum[If[p[k]&&q[2n-Prime[k]],1,0],{k,1,PrimePi[2n-1]}]
    Table[a[n],{n,1,100}]

A238756 Number of ordered ways to write n = k + m (k > 0 and m > 0) such that 2*k + 1, prime(prime(k)) - prime(k) + 1 and prime(prime(m)) - prime(m) + 1 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
We have verified this for n up to 10^7.
The conjecture suggests that there are infinitely many primes p with 2*pi(p) + 1 and prime(p) - p + 1 both prime.

Examples

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

Crossrefs

Programs

  • Mathematica
    p[k_]:=PrimeQ[Prime[Prime[k]]-Prime[k]+1]
    a[n_]:=Sum[If[PrimeQ[2k+1]&&p[k]&&p[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]
Showing 1-8 of 8 results.