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.

A235592 Numbers k such that k*(k+1) - prime(k) is prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 9, 11, 14, 15, 18, 19, 20, 21, 26, 27, 29, 34, 36, 37, 38, 41, 44, 45, 48, 53, 54, 57, 61, 62, 69, 70, 71, 85, 86, 87, 89, 90, 98, 99, 102, 105, 112, 114, 117, 119, 131, 134, 135, 136, 137, 141, 145, 147, 149, 150, 153, 156, 157, 162, 170, 171, 175, 176, 180, 183, 187, 189, 198, 200
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 12 2014

Keywords

Comments

It is known that prime(k) <= k*(k+1) for any positive integer k. The conjecture in A235613 implies that the sequence has infinitely many terms.
Conjecture: This sequence contains infinitely many primes.

Examples

			a(1) = 2 since 1*2 - prime(1) = 0 is not prime, but 2*3 - prime(2) = 3 is prime.
a(2) = 3 since 3*4 - prime(3) = 7 is prime.
a(3) = 4 since 4*5 - prime(4) = 13 is prime.
		

Crossrefs

Programs

  • Mathematica
    n=0;Do[If[PrimeQ[k(k+1)-Prime[k]],n=n+1;Print[n," ",k]],{k,1,200}]
    Select[Range[200],PrimeQ[(#(#+1))-Prime[#]]&] (* Harvey P. Dale, Apr 10 2020 *)

A235614 Number of ordered ways to write n = k + m with k a term of A235592 and m a positive triangular number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

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

Examples

			a(13) = 1 since 13 = 3 + 10 with 3*4 - prime(3) = 7 prime and 10 = 4*5/2 a positive triangular number.
a(52) = 1 since 52 = 37 + 15 with 37*38 - prime(37) = 1249 prime and 15 = 5*6/2 a positive triangular number.
a(61) = 1 since 61 = 6 + 55 with 6*7 - prime(6) = 29 prime and 55 = 10*11/2 a positive triangular number.
a(313) = 1 since 313 = 37 + 276 with 37*38 - prime(37) = 1249 prime and 276 = 23*24/2 a positive triangular number.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n(n+1)-Prime[n]]
    TQ[n_]:=IntegerQ[Sqrt[8n+1]]
    a[n_]:=Sum[If[PQ[k]&&TQ[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A235661 Primes p with p*(p+1) - prime(p) prime.

Original entry on oeis.org

2, 3, 5, 11, 19, 29, 37, 41, 53, 61, 71, 89, 131, 137, 149, 157, 233, 263, 271, 281, 293, 331, 337, 359, 389, 431, 433, 439, 457, 487, 499, 571, 617, 631, 659, 701, 739, 751, 761, 809, 859, 877, 907, 911, 1009, 1019, 1031, 1033, 1087, 1093
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

This sequence is a subsequence of A235592.
By the conjecture in A232353, this sequence should have infinitely many terms.

Examples

			2 is a term because 2*3 - prime(2) = 3 is prime.
3 is a term because 3*4 - prime(3) = 7 is prime.
5 is a term because 5*6 - prime(5) = 19 is prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n(n+1)-Prime[n]]
    n=0;Do[If[PQ[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]
    Select[Prime[Range[200]],PrimeQ[#(#+1)-Prime[#]]&] (* Harvey P. Dale, Feb 26 2025 *)

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 7.
This implies that there are infinitely many primes p with p*(p+1) - prime(p) prime.

Examples

			a(14) = 1 since 14 = 4 + 10 with prime(4) + phi(10) = 11 and 11*12 - prime(11) = 101 both prime.
a(15) = 1 since 15 = 6 + 9 with prime(6) + phi(9) = 19 and 19*20 - prime(19) = 313 both prime.
a(37) = 1 since 37 = 23 + 14 with prime(23) + phi(14) = 89 and 89*90 - prime(89) = 7549 both prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[n(n+1)-Prime[n]]
    f[n_,k_]:=Prime[k]+EulerPhi[n-k]
    a[n_]:=Sum[If[PQ[f[n,k]],1,0],{k,1,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}]

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