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 22 results. Next

A233307 a(n) = |{0 < k < n: p(k)^2 + q(n-k)^2 is prime}|, where p(.) is the partition function (A000041) and q(.) is the strict partition function (A000009).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 07 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, for any integer n > 4, p(k)*q(n-k) - 1 is prime for some 0 < k < n/2.
(ii) If n > 9, then prime(k)*p(n-k) + 1 is prime for some 0 < k < n. If n > 2, then prime(k)*q(n-k) - 1 is prime for some 0 < k < n, and also prime(k)*q(n-k) + 1 is prime for some 0 < k < n.
(iii) If n > 11, then prime(k) + p(n-k) is prime for some 0 < k < n. If n > 4, then prime(k) + q(n-k) is prime for some 0 < k < n, and also prime(k)^2 + q(n-k)^2 is prime for some 0 < k < n.

Examples

			a(5) = 1 since 5 = 1 + 4 with p(1)^2 + q(4)^2 = 1^2 + 2^2 = 5 prime.
a(6) = 1 since 6 = 3 + 3 with p(3)^2 + q(3)^2 = 3^2 + 2^2 = 13 prime.
a(19) = 1 since 19 = 3 + 16 with p(3)^2 + q(16)^2 = 3^2 + 32^2 = 1033 prime.
a(28) = 1 since 28 = 3 + 25 with p(3)^2 + q(25)^2 = 3^2 + 142^2 = 20173 prime.
a(29) = 1 since 29 = 6 + 23 with p(6)^2 + q(23)^2 = 11^2 + 104^2 = 10937 prime.
a(38) = 1 since 38 = 1 + 37 with p(1)^2 + q(37)^2 = 1^2 + 760^2 = 577601 prime.
a(75) = 1 since 75 = 13 + 62 with p(13)^2 + q(62)^2 = 101^2 + 13394^2 = 179409437 prime.
a(160) = 1 since 160 = 48 + 112 with p(48)^2 + q(112)^2 = 147273^2 + 1177438^2 = 1408049580373 prime.
a(210) = 1 since 210 = 71 + 139 with p(71)^2 + q(139)^2 = 4697205^2 + 8953856^2 = 102235272080761 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[PartitionsP[k]^2+PartitionsQ[n-k]^2],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A231557 Least positive integer k <= n such that 2^k + (n - k) is prime, or 0 if such an integer k does not exist.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 11 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
See also part (i) of the conjecture in A231201.
We have computed a(n) for all n up to 2*10^6 except for n = 1657977. Here are some relatively large values of a(n): a(421801) = 149536 (the author found that 2^{149536} + 421801 - 149536 is prime, and then his friend Qing-Hu Hou verified that 2^k + 421801 - k is composite for each integer 0 < k < 149536), a(740608) = 25487, a(768518) = 77039, a(1042198) = 31357, a(1235105) = 21652, a(1253763) = 39018, a(1310106) = 55609, a(1346013) = 33806, a(1410711) = 45336, a(1497243) = 37826, a(1549802) = 21225, a(1555268) = 43253, a(1674605) = 28306, a(1959553) = 40428.
Now we find that a(1657977) = 205494. The prime 2^205494 + (1657977-205494) has 61860 decimal digits. - Zhi-Wei Sun, Aug 30 2015
We have found that a(n) > 0 for all n = 1..7292138. For example, a(5120132) = 250851, and the prime 2^250851 + 4869281 has 75514 decimal digits. - Zhi-Wei Sun, Nov 16 2015
We have verified that a(n) > 0 for all n = 1..10^7. For example, a(7292139) = 218702 and 2^218702 + (7292139-218702) is a prime of 65836 decimal digits; also a(9302003) = 311468 and the prime 2^311468 + (9302003-311468) has 93762 decimal digits. - Zhi-Wei Sun, Jul 28 2016

Examples

			a(1) = 1 since 2^1 + (1-1) = 2 is prime.
a(2) = 1 since 2^1 + (2-1) = 3 is prime.
a(3) = 2 since 2^1 + (3-1) = 4 is not prime, but 2^2 + (3-2) = 5 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[2^x+n-x],Print[n," ",x];Goto[aa]],{x,1,n}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]
  • PARI
    a(n) = {for (k = 1, n, if (isprime(2^k+n-k), return (k));); return (0);} \\ Michel Marcus, Nov 11 2013

A231561 Number of ways to write n = x + y with 0 < x <= y such that 2^x * y + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 11 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, any integer n > 1 can be written as x + y (x, y > 0) with 2^x * y^2 + 1 prime.
(ii) Each integer n > 2 can be written as x + y (x, y > 0) with 2^x * y - 1 prime. Also, every n = 3, 4, ... can be expressed as x + y (x, y > 0) with 2^x * y^2 - 1 prime.

Examples

			a(7) = 1 since 7 = 1 + 6 with 2^1 * 6 + 1 = 13 prime.
a(14) = 1 since 14 = 3 + 11 with 2^3 * 11 + 1 = 89 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2^x*(n-x)+1],1,0],{x,1,n/2}]
    Table[a[n],{n,1,100}]

A232504 Number of ways to write n = k + m (k, m > 0) with p(k) + q(m) prime, where p(.) is the partition function (A000041) and q(.) is the strict partition function (A000009).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 25 2013

Keywords

Comments

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

Examples

			a(5) = 1 since 5 = 1 + 4 with p(1) + q(4) = 1 + 2 = 3 prime.
a(8) = 1 since 8 = 4 + 4 with p(4) + q(4) = 5 + 2 = 7 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[PartitionsP[k]+PartitionsQ[n-k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A231516 Number of ways to write n = x + y with 0 < x <= y such that x!*y + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 11 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. Also, any integer n > 3 can be written as x + y with 0 < x <= y such that x!*y -1 is prime.
We have verified the conjecture for n up to 10^6.

Examples

			a(9) = 1 since 9 = 3 + 6 with 3!*6 + 1 = 37 prime.
a(12) = 1 since 12 = 4 + 8 with 4!*8 + 1 = 193 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[x!*(n-x)+1],1,0],{x,1,n/2}]
    Table[a[n],{n,1,100}]

A231555 Number of ways to write n = x + y (x, y > 0) with x*(x + 1) + F(y) prime, where F(y) denotes the y-th Fibonacci number (A000045).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 10 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, any integer n > 1 can be written as x + y (x, y > 0) with x + F(y) prime.
(ii) Each positive integer n not among 1, 7, 55 can be written as x + y (x, y > 0) with x*(x+1)/2 + F(y) prime. Also, any positive integer n not among 1, 10, 13, 20, 255 can be written as x + y (x, y > 0) with x^2 + F(y) prime.
We also have similar conjectures involving some second-order recurrences other than the Fibonacci sequence.

Examples

			a(19) = 1 since 19 = 17 + 2 with 17*18 + F(2) = 307 prime.
a(30) = 1 since 30 = 8 + 22 with 8*9 + F(22) = 17783 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[x(x+1)+Fibonacci[n-x]],1,0],{x,1,n-1}]
    Table[a[n],{n,1,100}]

A232398 Number of ways to write n = p + (2^k - k) + (2^m - m) with p prime and 0 < k <= m.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 23 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
This was motivated by A231201. We have verified the conjecture for n up to 2*10^8. It seems that a(n) = 1 for no odd n.
In contrast, R. Crocker proved that there are infinitely many positive odd numbers not of the form p + 2^k + 2^m with p prime and k, m > 0.
It seems that any integer n > 3 not equal to 1361802 can be written in the form p + (2^k + k) + (2^m + m), where p is a prime, and k and m are nonnegative integers.
On Dec 08 2013, Qing-Hu Hou finished checking the conjecture for n up to 10^10 and found no counterexamples. - Zhi-Wei Sun, Dec 08 2013

Examples

			a(11) = 2 since 11 = 5 + (2 - 1) + (2^3 - 3) = 7 + (2^2 - 2) + (2^2 - 2) with 5 and 7 prime.
a(28) = 1 since 28 = 11 + (2^3 - 3) + (2^4 - 4) with 11 prime.
a(94) = 1 since 94 = 31 + (2^3 - 3) + (2^6 - 6) with 31 prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    A232398[n_] := Sum[If[2^m - m < n && PQ[n - 2^m + m - 2^k + k], 1, 0], {m, Log[2, 2n]}, {k, m}]; Table[A232398[n], {n, 100}]

A233150 Number of ways to write n = k + m (k, m > 0) with 2^k + prime(m) prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 05 2013

Keywords

Comments

Conjecture: a(n) > 0 except for n = 1, 2, 7.
We have verified this for n up to 3*10^7. For n = 15687374, the least positive integer k with 2^k + prime(n-k) prime is 51299. For n = 28117716, the least positive integer k with 2^k + prime(n-k) prime is 81539.

Examples

			a(9) = 1 since 9 = 7 + 2 with 2^7 + prime(2) = 128 + 3 = 131 prime.
a(13) = 1 since 13 = 3 + 10 with 2^3 + prime(10) = 8 + 29 = 37 prime.
a(588) = 1 since 588 = 66 + 522 with 2^{66} + prime(522) = 2^{66} + 3739 = 73786976294838210203 prime.
a(1012) = 1 since 1012 = 317 + 695 with 2^{317} + prime(695) = 2^{317} + 5231 prime.
		

Crossrefs

Programs

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

A231631 Least positive integer k < n with k!*(n-k) + 1 prime, or 0 if such an integer k does not exist.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 11 2013

Keywords

Comments

Conjecture: 0 < a(n) < sqrt(n)*(log n) for all n > 2.
See also the conjecture in A231516.

Examples

			a(4) = 2 since 1!*3 + 1 = 4 is not prime, but 2!*2 + 1 = 5 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[x!*(n-x)+1],Print[n," ",x];Goto[aa]],{x,1,n-1}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]
    lpik[n_]:=Module[{k=1},While[!PrimeQ[k!(n-k)+1],k++];k]; Join[{0},Array[ lpik,100,2]] (* Harvey P. Dale, Apr 19 2019 *)

A233183 Number of ways to write n = k + m with 0 < k < m such that C(2*k, k) + prime(m) is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 05 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2.
We have verified this for n up to 10^8.

Examples

			a(6) = 2 since 6 = 1 + 5 = 2 + 4 with C(2*1, 1) + prime(5) = C(2*2, 2) + prime(4) = 13 prime.
a(9) = 1 since 9 = 2 + 7 with C(2*2, 2) + prime(7) = 6 + 17 = 23 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Binomial[2k,k]+Prime[n-k]],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,100}]
Showing 1-10 of 22 results. Next