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

A235613 Number of ways to write n = k + m (0 < k <= m) with k and m terms of A235592.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 12 2014

Keywords

Comments

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

Examples

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

Crossrefs

Programs

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

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

A235703 Number of ordered ways to write n = p + q with p a term of A234695 and q a term of A235592.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2014

Keywords

Comments

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

Examples

			 a(4) = 1 since 4 = 2 + 2 with 2, prime(2) - 2 + 1 = 2 and 2*3 - prime(2) = 3 all prime.
a(30) = 1 since 30 = 3 + 27 with 3, prime(3) - 3 + 1 = 3 and 27*28 - prime(27) = 756 - 103 = 653 all prime.
a(83) = 1 since 83 = 13 + 70 with 13, prime(13) - 13 + 1 = 29 and 70*71 - prime(70) = 4970 - 349 = 4621 all prime.
		

Crossrefs

Programs

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

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 15 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5, and a(n) = 1 only for n = 191.
(ii) If n > 8 is not equal to 32, then there is a positive integer k < n - 2 such that 2*m + 1, m*(m+1) - prime(m) and m*(m+1) + prime(m) are all prime, where m = sigma(k) + phi(n-k)/2, and sigma(k) is the sum of all positive divisors of k.
(iii) If n > 444, then there is a positive integer k < n such that 2*m + 1, m^2 - prime(m) and m^2 + prime(m) are all prime, where m = sigma(k) + phi(n-k).
Clearly, part (i) of the conjecture implies that there are infinitely many odd primes p = 2*m + 1 with m*(m+1) - prime(m) = (p^2-1)/4 - prime((p-1)/2) and m*(m+1) + prime(m) = (p^2-1)/4 + prime((p-1)/2) both prime.

Examples

			a(6) = 2 since phi(1) + phi(5)/2 = phi(3) + phi(3)/2 = 3 with 2*3 + 1 = 7, 3*4 - prime(3) = 7 and 3*4 + prime(3) = 17 all prime.
a(191) = 1 since phi(153) + phi(38)/2 = 105 with 2*105 + 1 = 211, 105*106 - prime(105) = 11130 - 571 = 10559 and 105*106 + prime(105) = 11130 + 571 = 11701 all prime.
		

Crossrefs

Programs

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

A235806 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, 29, 41, 43, 53, 59, 89, 109, 139, 179, 181, 229, 379, 401, 421, 431, 541, 587, 659, 811, 991, 1069, 1103, 1117, 1231, 1259, 1459, 1471, 1619, 1709, 1831, 1951, 2179, 2791, 2797, 2833, 2851, 3001, 3391, 3571, 3617, 3631, 3637, 3671, 3793, 3863, 3929, 3967
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 16 2014

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[n(n+1)-Prime[n]]&&PrimeQ[n(n+1)-Prime[n+1]]
    n=0;Do[If[q[(Prime[k]-1)/2],n=n+1;Print[n," ",Prime[k]]],{k,2,1000}]
    Select[Prime[Range[2,600]],AllTrue[(#^2-1)/4-{Prime[(#-1)/2],Prime[ (#+1)/2]},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 05 2020 *)

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 16 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 11.
This implies that there are infinitely many odd primes p = 2*m + 1 with q = m*(m-1) - prime(m) and r = m*(m+1) - prime(m) both prime. Note that r - q = 2*m.

Examples

			 a(10) = 1 since phi(5) + phi(5)/2 = 6 with 2*6 + 1 = 13, 5*6 - prime(6) = 30 - 13 = 17 and 6*7 - prime(6) = 42 - 13 = 29 all prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 3, 2, 4, 4, 4, 4, 4, 4, 2, 6, 3, 7, 4, 2, 7, 3, 5, 4, 4, 6, 6, 6, 4, 4, 7, 8, 9, 6, 6, 11, 8, 10, 6, 6, 12, 8, 13, 6, 12, 8, 13, 10, 7, 14, 10, 11, 11, 11, 16, 14, 13, 9, 15, 11, 23, 14, 12, 11, 12, 10, 14, 8, 15, 9, 14, 13, 11, 12, 9, 19, 9, 14, 11, 16, 8, 14, 5, 13, 8, 13, 9, 13, 10, 15, 10, 11, 12, 17, 8, 13, 10, 11, 7, 18
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 16 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
This implies that there are infinitely many odd primes p = 2*m + 1 with m*(m+1) - prime(m) and m*(m+1)- prime(m+1) both prime.

Examples

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

Crossrefs

Programs

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