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

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}]

A235727 Odd primes p with (p^2 - 1)/4 - prime((p - 1)/2) and (p^2 - 1)/4 + prime((p - 1)/2) both prime.

Original entry on oeis.org

7, 11, 19, 23, 41, 73, 83, 109, 197, 211, 229, 271, 379, 461, 541, 631, 641, 659, 859, 991, 1031, 1049, 1051, 1093, 1103, 1217, 1429, 1451, 1879, 2063, 2131, 2287, 2341, 2411, 3019, 3257, 3461, 3659, 3673, 3691, 3709, 3917, 3967, 4409, 4463, 4519, 5279, 5303, 5471, 5477
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 15 2014

Keywords

Comments

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

Examples

			a(1) = 7 since neither (3^2-1)/4 - prime((3-1)/2) = 1 nor (5^2-1)/4 + prime((5-1)/2) = 9 is prime, but (7^2-1)/4 - prime((7-1)/2) = 12 - 5 = 7 and (7^2-1)/4 + prime((7-1)/2) = 12 + 5 = 17 are both prime.
		

Crossrefs

Programs

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

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}]
Showing 1-3 of 3 results.