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

A231201 Number of ways to write n = x + y (x, y > 0) with 2^x + y prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 10 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Moreover, any integer n > 7 can be written as x + y with 0 < x < y such that 2^x + y is prime.
(ii) Every n = 2, 3, ... can be written as x + y (x, y > 0) with 2^x + y*(y+1)/2 prime.
(iii) Each integer n > 1 can be written as x + y (x, y > 0) with 2^x + y^2 - 1 prime. Also, any integer n > 1 not equal to 16 can be written as x + y (x, y > 0) with 2^x + y^4 - 1 prime.
We have verified part (i) of the conjecture for n up to 1.6*10^6. For example, 421801 = 149536 + 272265 with 2^149536 + 272265 prime.
We have extended our verification of part (i) of the conjecture for n up to 2*10^6. For example, 1657977 = 205494 + 1452483 with 2^205494 + 1452483 prime. - Zhi-Wei Sun, Aug 30 2015
The verification of part (i) of the conjecture has been made for n up to 7.29*10^6. For example, we find that 5120132 = 250851 + 4869281 with 2^250851 + 4869281 a prime of 75514 decimal digits. - Zhi-Wei Sun, Nov 16 2015
We have finished the verification of part (i) of the conjecture for n up to 10^7. For example, we find that 9302003 = 311468 + 8990535 with 2^311468 + 8990535 a prime of 93762 decimal digits. - Zhi-Wei Sun, Jul 28 2016
In a paper published in 2017, the author announced a USD $1000 prize for the first solution to his conjecture that a(n) > 0 for all n > 1. - Zhi-Wei Sun, Dec 03 2017

Examples

			a(8) = 1 since 8 = 3 + 5 with 2^3 + 5 = 13 prime.
a(53) = 1 since 53 = 20 + 33 with 2^{20} + 33 = 1048609 prime.
a(64) = 1 since 64 = 13 + 51 with 2^{13} + 51 = 8243 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2^x+n-x],1,0],{x,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}]

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

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 *)

A231577 Number of ways to write n = x + y (x, y > 0) with 2^x + y*(y+1)/2 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 11 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This implies that there are infinitely many primes each of which is a sum of a power of 2 and a triangular number.
See also A231201, A231555 and A231561 for other similar conjectures.

Examples

			 a(23) = 1 since 23 = 9 + 14 with 2^9 + 14*15/2 = 617 prime.
a(64) = 1 since 64 = 14 + 50 with 2^{14} + 50*51/2 = 17659 prime.
		

Crossrefs

Programs

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

A231635 Number of ways to write n = x + y with 0 < x <= y such that lcm(x, y) + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 12 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, any integer n > 3 can be written as x + y (x, y > 0) with lcm(x, y) - 1 prime.
(ii) Each n = 2, 3, ... can be expressed as x + y (x, y > 0) with lcm(x, y)^2 + lcm(x, y) + 1 prime. Also, any integer n > 1 not equal to 10 can be written as x + y (x, y > 0) with lcm(x, y)^2 + 1 prime.
From Mauro Fiorentini, Aug 02 2023: (Start)
Both parts of conjecture (i) verified for n up to 10^9.
Both parts of conjecture (ii) verified for n up to 10^6. (End)

Examples

			a(9) = 1 since 9 = 3 + 6 with lcm(3, 6) + 1 = 7 prime.
a(10) = 1 since 10 = 4 + 6 with lcm(4, 6) + 1 = 13 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[LCM[x,n-x]+1],1,0],{x,1,n/2}]
    Table[a[n],{n,1,100}]
Showing 1-7 of 7 results.