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.

Previous Showing 11-20 of 22 results. Next

A233204 Number of ways to write n = k + m with 0 < k < m such that 2^k * prime(m) + 3 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 05 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3. Also, any integer n > 2 can be written as k + m (0 < k <= m) with 2^k*prime(m) - 3 prime.
(ii) Any integer n > 6 can be written as k + m (0 < k < m) with prime(k) + 6 and prime(m) + 6 both prime. Each integer n > 4 can be written as k + m (0 < k < m) with prime(k) + 2 and prime(m) + 6 both prime. Also, for every integer n > 3 not among 11, 21, 32, 49, 171, there is a positive integer k < n with prime(k) + 2 and prime(n-k) + 2 both prime.

Crossrefs

Programs

  • Maple
    a(6) = 1 since 6 = 2 + 4 with 2^2*prime(4) + 3 = 4*7 + 3 = 31 prime.
    a(22) = 1 since 22 = 1 + 21 with 2^1*prime(21) + 3 = 2*73 + 3 = 149 prime.
  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2^k*Prime[n-k]+3],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,100}]

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

A232616 Least positive integer m such that {2^k - k: k = 1,...,m} contains a complete system of residues modulo n.

Original entry on oeis.org

1, 2, 4, 5, 10, 6, 14, 10, 12, 18, 29, 13, 33, 22, 40, 19, 38, 18, 58, 21, 36, 58, 75, 26, 60, 66, 40, 64, 195, 53, 87, 36, 158, 67, 130, 37, 133, 94, 90, 42, 95, 42, 105, 112, 112, 140, 247, 51, 122, 94, 119, 120, 311, 54, 126, 90, 184, 223, 264, 61
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 26 2013

Keywords

Comments

By a result of the author (see arXiv:1312.1166), for any integers a and n > 0, the set {a^k - k: k = 1, ..., n^2} contains a complete system of residues modulo n. (We may also replace a^k - k by a^k + k.) Thus a(n) always exists and it does not exceed n^2.
Conjectures:
(i) a(n) < 2*(prime(n)-1) for all n > 0.
(ii) The Diophantine equation x^n - n = y^m with m, n, x, y > 1 only has two integral solutions: 2^5 - 5 = 3^3 and 2^7 - 7 = 11^2. Also, the Diophantine equation x^n + n = y^m with m, n, x, y > 1 only has two integral solutions: 5^2 + 2 = 3^3 and 5^3 + 3 = 2^7.

Examples

			a(3) = 4 since {2 - 1, 2^2 - 2, 2^3 - 3} = {1, 2, 5} does not contain a complete system of residues mod 3, but {2 - 1, 2^2 - 2, 2^3 - 3, 2^4 - 4} = {1, 2, 5, 12} does.
		

Crossrefs

Programs

  • Mathematica
    L[m_,n_]:=Length[Union[Table[Mod[2^k-k,n],{k,1,m}]]]
    Do[Do[If[L[m,n]==n,Print[n," ",m];Goto[aa]],{m,1,n^2}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]

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

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

Original entry on oeis.org

0, 0, 1, 2, 3, 1, 3, 2, 5, 2, 4, 2, 7, 2, 5, 3, 5, 3, 10, 4, 5, 3, 8, 3, 14, 6, 5, 4, 11, 5, 11, 3, 11, 9, 4, 5, 10, 5, 11, 9, 12, 3, 19, 7, 11, 6, 12, 9, 11, 7, 17, 7, 13, 5, 22, 3, 3, 15, 16, 5, 25, 4, 9, 11, 13, 5, 19, 6, 22, 6, 11, 6, 39, 6, 24, 7, 7, 6, 25, 8, 21, 11, 24, 7, 31, 7, 19, 11, 33, 10, 14, 8, 15, 27, 18, 9, 21, 4, 27, 9
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 12 2013

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 2. Also, any integer n > 4 can be written as x + y (x, y > 0) with x^2 * y + 1 prime.
(ii) Each n = 2, 3, ... can be expressed as x + y (x, y > 0) with (x*y)^2 + x*y + 1 prime.
(iii) Also, any integer n > 2 can be written as x + y (x, y > 0) with 2*(x*y)^2 - 1 (or (x*y)^2 + x*y - 1) prime.
From Mauro Fiorentini, Jul 31 2023: (Start)
Both parts of conjecture (i) verified for n up to 10^9.
Conjecture (ii) and both parts of conjecture (iii) verified for n up to 10^7. (End)

Examples

			a(6) = 1 since 6 = 4 + 2 with 4^2*2 - 1 = 31 prime.
		

Crossrefs

Programs

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

A231776 Least positive integer k <= n with (2^k + k) * n - 1 prime, or 0 if such a number k does not exist.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 6, 2, 10, 1, 2, 1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 8, 6, 1, 2, 1, 4, 2, 2, 1, 8, 1, 4, 1, 2, 2, 14, 2, 2, 1, 2, 1, 2, 6, 2, 1, 4, 2, 2, 3, 8, 1, 6, 1, 2, 1, 8, 5, 4, 1, 2, 1, 2, 6, 42, 2, 6, 2, 4, 2, 2, 1, 2, 1, 4, 1, 4, 2, 8, 1, 2, 1, 2, 1, 6, 1, 8, 20, 2, 1, 2, 6, 10, 1, 2, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 13 2013

Keywords

Comments

We find that 75011 is the only value of n <= 10^5 with a(n) = 0. The least positive integer k with (2^k + k)*75011 - 1 prime is 81152.

Examples

			a(3) = 2 since (2^1 + 1) * 3 - 1 = 8 is not prime, but (2^2 + 2) * 3 - 1 = 17 is prime.
		

Crossrefs

Programs

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

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}]
Previous Showing 11-20 of 22 results. Next