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

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

A321805 Number of permutations f of {1,...,n} such that k!*f(k) + 1 is prime for every k from 1 to n.

Original entry on oeis.org

1, 2, 4, 6, 10, 10, 13, 40, 212, 702, 3531, 19008, 34858, 39764, 102312, 47927, 94860, 232006, 658766, 829583, 1547703, 2040211, 32073218, 51347260, 496226762, 1504307318, 16663026685, 125080784519, 241032642271, 1216752358950, 2147004248698, 9320087810948, 19383919945950, 16259146126113, 81023699301023, 124167501991213
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 19 2018

Keywords

Comments

Though the first 27 terms are positive, we have a(50) = 0 since all the numbers 50!*k + 1, with k = 1..50, are composite.

Examples

			a(2) = 2 since (1,2) and (2,1) are permutations of {1,2} with 1!*1 + 1 = 2, 2!*2 + 1 = 5, 1!*2 + 1 = 3 and 2!*1 + 1 = 3 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Permanent[Table[Boole[PrimeQ[i!*j+1]],{i,1,n},{j,1,n}]]; Do[Print[n," ",a[n]],{n,1,27}]
  • PARI
    a(n)={matpermanent(matrix(n, n, i, j, isprime(i!*j+1)))} \\ Andrew Howroyd, Nov 19 2018

Extensions

a(28)-a(31) from Jinyuan Wang, Jun 13 2020
a(32)-a(36) from Vaclav Kotesovec, Aug 19 2021

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

A239451 a(n) = |{1 < k < sqrt(n)*log(n): prime(n) + C(prime(k)-1, (prime(k)-1)/2) is prime}|, where C(2j,j) = (2j)!/(j!)^2.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 19 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) For any integer n > 4, there is an odd prime p < prime(n) with n*C(p-1,(p-1)/2) + 1 prime.
(iii) For every n = 2, 3, ..., there is a positive integer k < 5*sqrt(n)/3 with n*C(2*k,k) - 1 prime.
(iv) For any integer n > 1, k!*n - 1 (or k!*n + 1) is prime for some k = 1, ..., n.
We have verified that a(n) > 0 for all n = 5, ..., 10^7.

Examples

			a(6) = 1 since prime(6) + C(prime(3)-1, (prime(3)-1)/2) = 13 + C(4, 2) = 13 + 6 = 19 is prime.
a(8) = 1 since prime(8) + C(prime(5)-1, (prime(5)-1)/2) = 19 + C(10, 5) = 19 + 252 = 271 is prime.
a(14) = 1 since prime(14) + C(prime(6)-1, (prime(6)-1)/2) = 43 + C(12, 6) = 43 + 924 = 967 is prime.
a(7597) = 1 since prime(7597) + C(prime(686)-1, (prime(686)-1)/2) = 77323 + C(5146, 2573) is prime.
a(193407) = 2 since prime(193407) + C(prime(3212)-1, (prime(3212)-1)/2) =  2652113 + C(29586, 14793) and prime(193407) + C(prime(5348)-1, (prime(5348)-1)/2) = 2652113 + C(52312, 26156) are both prime.
a(4517422) > 0 since prime(4517422) + C(prime(6918)-1, (prime(6918)-1)/2) = 77233291 + C(69778, 34889) is prime.
a(4876885) > 0 since prime(4876885) + C(prime(8904)-1, (prime(8904)-1)/2) = 83778493 + C(92202, 46101) is prime.
a(5887242) > 0 since prime(5887242) + C(prime(5678)-1, (prime(5678)-1)/2) = 102316597 + C(55930, 27965) is prime.
a(8000871) > 0 since prime(8000871) + C(prime(4797)-1, (prime(4797)-1)/2) = 141667111 + C(46410, 23205) is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[Prime[n]+Binomial[Prime[k]-1,(Prime[k]-1)/2]]
    a[n_]:=Sum[If[p[n,k],1,0],{k,2,Ceiling[Sqrt[n]*Log[n]]-1}]
    Table[a[n],{n,1,80}]
Showing 1-7 of 7 results.