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

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

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

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

A233206 Number of ways to write n = k + m (0 < k <= m) with k! + prime(m) prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 05 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
We have verified this for n up to 10^7. For n = 1356199, the least positive integer k with k! + prime(n-k) prime is 4496. For n = 7212995, the smallest positive integer k with k! + prime(n-k) prime is 4507.

Examples

			a(6) = 1 since 6 = 3 + 3 with 3! + prime(3) = 6 + 5 = 11 prime.
a(11) = 1 since 11 = 4 + 7 with 4! + prime(7) = 24 + 17 = 41 prime.
		

Crossrefs

Programs

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

A231725 Least positive integer k < n such that n + k + 2^k is prime, or 0 if such an integer k does not exist.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 10, 1, 2, 3, 6, 1, 4, 5, 2, 5, 2, 1, 4, 1, 8, 3, 2, 3, 4, 1, 2, 3, 2, 1, 4, 1, 2, 3, 6, 1, 12, 5, 2, 3, 8, 1, 4, 5, 2, 11, 2, 1, 6, 1, 4, 3, 2, 3, 4, 1, 2, 5, 2, 1, 4, 1, 22, 3, 2, 57, 10, 1, 2, 3, 6, 1, 4, 11, 2, 11, 8, 1, 4, 7, 4, 3, 2, 3, 4, 1, 2, 3, 2, 1, 16, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 12 2013

Keywords

Comments

This was motivated by A231201 and A231557.
Conjecture: a(n) > 0 for all n > 3. We have verified this for n up to 2*10^6; for example, we find the following relatively large values of a(n): a(65958) = 37055, a(299591) = 51116, a(295975) = 13128, a(657671) = 25724, a(797083) = 44940, a(1278071) = 24146, a(1299037) = 34502, a(1351668) = 25121, a(1607237) = 34606, a(1710792) = 11187, a(1712889) = 18438.
I conjecture the opposite. In particular I expect that a(n) = 0 for infinitely many values of n. - Charles R Greathouse IV, Nov 13 2013

Examples

			a(3) = 0 since 3 + 1 + 2^1 = 6 and 3 + 2 + 2^2 = 9 are both composite.
a(5) = 2 since 5 + 1 + 2^1 = 8 is not prime, but 5 + 2 + 2^2 = 11 is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[n+k+2^k],Print[n," ",k];Goto[aa]],{k,1,n-1}];
    Print[n," ",0];Label[aa];Continue,{n,1,100}]
  • PARI
    a(n)=for(k=1,n-1,if(ispseudoprime(n+k+2^k),return(k)));0 \\ Charles R Greathouse IV, Nov 13 2013

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

A264865 Primes of the form 2^x + y (x >= 0 and 0 <= y < 2^x) such that all the numbers 2^(x-a) + (y+a) (0 < a <= x) are composite.

Original entry on oeis.org

5, 7, 13, 19, 31, 47, 61, 71, 101, 211, 239, 241, 271, 281, 311, 331, 379, 421, 449, 491, 617, 619, 631, 751, 797, 827, 853, 863, 883, 971, 991, 1009, 1051, 1117, 1171, 1217, 1277, 1291, 1297, 1301, 1321, 1327, 1429, 1453, 1471, 1483, 1487, 1531, 1567, 1607, 1627, 1637, 1667, 1669, 1697, 1709, 1723, 1747, 1801, 1847
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 26 2015

Keywords

Comments

Conjecture: The sequence has infinitely many terms.
This is motivated by part (i) of the conjecture in A231201.
See also A264866 for a related conjecture.

Examples

			a(1) = 5 since 5 = 2^2 + 1 is a prime with 1 < 2^2, and 2^0 + 3 = 2^1 + 2 = 4 is composite.
a(3) = 13 since 13 = 2^3 + 5 is a prime with 5 < 2^3, and 2^0 + 8 = 2^1 + 7 = 9 and 2^2 + 6 = 10 are both composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=Prime[n]
    x[n_]:=x[n]=Floor[Log[2,p[n]]]
    y[n_]:=y[n]=p[n]-2^(x[n])
    n=0;Do[Do[If[PrimeQ[2^(x[k]-a)+y[k]+a],Goto[aa]],{a,1,x[k]}];n=n+1;Print[n," ",p[k]];Label[aa];Continue,{k,1,283}]

A264866 Primes of the form 2^x + y (x >= 0 and 0 <= y < 2^x) such that all the numbers 2^(x+a) + (y-a) (0 < a <= y) are composite.

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 19, 23, 41, 71, 131, 149, 257, 277, 523, 1117, 2053, 2161, 2237, 2251, 2999, 4099, 5237, 8233, 8243, 16453, 16553, 32771, 32779, 32783, 32789, 32797, 32801, 32839, 32843, 32917, 33623, 65537, 65539, 65543, 65563, 65599, 65651, 72497, 131129, 131267, 134777, 262147, 262151, 264959
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 26 2015

Keywords

Comments

Conjecture: The sequence has infinitely many terms.
This is motivated by part (i) of the conjecture in A231201 and the conjecture in A264865.

Examples

			a(4) = 11 since 11 = 2^3 + 3 is a prime with 3 < 2^3, and 2^4 + 2 = 18, 2^5 + 1 = 33 and 2^6 + 0 = 64 are all composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=p[n]=Prime[n]
    x[n_]:=x[n]=Floor[Log[2,p[n]]]
    y[n_]:=y[n]=p[n]-2^(x[n])
    n=0;Do[Do[If[PrimeQ[2^(x[k]+a)+y[k]-a],Goto[aa]],{a,1,y[k]}];n=n+1;Print[n," ",p[k]];Label[aa];Continue,{k,1,23226}]
Showing 1-10 of 13 results. Next