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

A232186 Number of ways to write n = p + q (q > 0) with p and p^3 + n*q^2 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 20 2013

Keywords

Comments

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

Examples

			a(10) = 1 since 10 = 7 + 3 with 7 and 7^3 + 10*3^2 = 433 both prime.
a(11) = 1 since 11 = 5 + 6 with 5 and 5^3 + 11*6^2 = 521 both prime.
a(124) = 1 since 124 = 19 + 105 with 19 and 19^3 + 124*105^2 = 1373959 both prime.
		

Crossrefs

Programs

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

A233439 a(n) = |{0 < k < n: prime(k)^2 + 4*prime(n-k)^2 is prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 09 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any integer n > 10, prime(j)^3 + 2*prime(n-j)^2 is prime for some 0 < j < n, and prime(k)^3 + 2*prime(n-k)^3 is prime for some 0 < k < n.
(iii) If n > 5, then prime(k)^3 + 2*p(n-k)^3 is prime for some 0 < k < n, where p(.) is the partition function (A000041). If n > 2, then prime(k)^3 + 2*q(n-k)^3 is prime for some 0 < k < n, where q(.) is the strict partition function (A000009).

Examples

			a(4) = 1 since prime(3)^2 + 4*prime(1)^2 = 5^2 + 4*2^2 = 41 is prime.
a(6) = 1 since prime(5)^2 + 4*prime(1)^2 = 11^2 + 4*2^2 = 137 is prime.
a(8) = 1 since prime(3)^2 + 4*prime(5)^2 = 5^2 + 4*11^2 = 509 is prime.
a(16) = 1 since prime(6)^2 + 4*prime(10)^2 = 13^2 + 4*29^2 = 3533 is prime.
		

Crossrefs

Programs

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

A232194 Number of ways to write n = x + y (x, y > 0) with n*x + y and n*y - x both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 20 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2. Also, a(n) = 1 only for n = 3, 4, 6, 20, 24.
(ii) Any positive integer n not among 1, 30, 54 can be written as x + y (x, y > 0) with n*x + y and n*y + x both prime.
(iii) Each integer n > 1 not equal to 8 can be expressed as x + y (x, y > 0) with n*x^2 + y (or x^4 + n*y) prime.
(iv) Any integer n > 5 can be written as p + q (q > 0) with p and n*q^2 + 1 both prime.
See also A232174 for a similar conjecture.

Examples

			a(3) = 1 since 3 = 1 + 2 with 3*1 + 2 = 3*2 - 1 = 5 prime.
a(4) = 1 since 4 = 1 + 3 with 4*1 + 3 = 7 and 4*3 - 1 = 11 both prime.
a(6) = 1 since 6 = 1 + 5 with 6*1 + 5 = 11 and 6*5 - 1 = 29 both prime.
a(20) = 1 since 20 = 9 + 11 with 20*9 + 11 = 191 and 20*11 - 9 = 211 both prime.
a(24) = 1 since 24*19 + 5 = 461 and 24*5 - 19 = 101 both prime.
		

Crossrefs

Programs

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

A232269 Number of ways to write 2*n + 1 = x + y (x, y > 0) with x^3 + y^2 and x^2 + y^2 both prime.

Original entry on oeis.org

1, 3, 1, 2, 3, 2, 1, 6, 4, 1, 4, 6, 3, 8, 1, 1, 6, 1, 1, 9, 2, 4, 5, 3, 1, 2, 7, 4, 5, 8, 1, 12, 4, 4, 12, 3, 4, 9, 10, 1, 5, 9, 5, 11, 7, 4, 9, 2, 4, 19, 1, 1, 14, 4, 6, 16, 8, 5, 8, 7, 2, 11, 8, 1, 16, 3, 5, 9, 4, 3, 8, 8, 6, 16, 4, 3, 12, 13, 5, 11, 5, 3, 10, 10, 7, 12, 7, 4, 17, 20, 1, 17, 5, 6, 15, 4, 5, 18, 5, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 22 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Also, any odd integer greater than one can be written as x + y (0 < x < y) with x^3 + y^2 prime.
The conjecture implies that there are infinitely many primes of the form x^3 + y^2 (x, y > 0) with x^2 + y^2 also prime.
Note that Ming-Zhi Zhang ever asked (cf. A036468) whether any odd integer greater than one can be written as x + y (x, y > 0) with x^2 + y^2 prime.

Examples

			a(10) = 1 since 2*10 + 1 = 1 + 20 with 1^2 + 20^2 = 1^3 + 20^2 = 401 prime.
a(15) = 1 since 2*15 + 1 = 25 + 6 with 25^2 + 6^2 = 661 and 25^3 + 6^2 = 15661 both prime.
a(40) = 1 since 2*40 + 1 = 55 + 26 with 55^2 + 26^2 = 3701 and 55^3 + 26^2 = 167051 both prime.
a(91) =1 since 2*91 + 1 = 85 + 98 with 85^2 + 98^2 = 16829 and 85^3 + 98^2 = 623729 both prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 8, 12, 16. Moreover, if m and n are positive integers with m >= max{2, n-1} and gcd(m, n+1) = 1, then x^2 + n*y^2 is prime for some positive integers x and y with x + y = m, except for the case m = n + 3 = 29.
(ii) Let m and n be integers greater than one with m >= (n-1)/2 and gcd(m, n-1) = 1. Then x + n*y is prime for some positive integers x and y with x + y = m.
(iii) Any integer n > 3 not equal to 12 or 16 can be written as x + y (x, y > 0) with (n-2)*x - y and (n-2)*x^2 + y^2 both prime.

Examples

			 a(8) = 1 since 8 = 5 + 3 with 5^2 + (8-2)*3^2 = 79 prime.
a(12) = 1 since 12 = 11 + 1 with 11^2 + (12-2)*1^2 = 131 prime.
a(16) = 1 since 16 = 15 + 1 with 15^2 + (16-2)*1^2 = 239 prime.
		

Crossrefs

Programs

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

A275115 Least prime of the form x^2 + n*y^2 with x>0 and y>0.

Original entry on oeis.org

2, 3, 7, 5, 29, 7, 11, 17, 13, 11, 47, 13, 17, 23, 19, 17, 53, 19, 23, 29, 37, 23, 59, 73, 29, 107, 31, 29, 173, 31, 47, 41, 37, 43, 71, 37, 41, 47, 43, 41, 173, 43, 47, 53, 61, 47, 83, 73, 53, 59, 67, 53, 89, 79, 59, 137, 61, 59, 317, 61, 97, 71, 67, 73, 101, 67, 71, 149, 73, 71
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Jul 17 2016

Keywords

Comments

Neither x nor y can be zero because the remaining part of the form would then be composite.
a(n) > n.
The differences, d, between a(n) and n are 1, 4, 9, 16, 24, 25, 36, 49, 64, 81, 100, 121, 132, 144, 169, 196, 225, 256, 258, 289, 324, 361, 400, 441, ..., .
Not all 'd's are squares, such as 24, 132, 258, 1032, 1167, 1518, 2103, 2472, 2652, 2706, 5793. It is conjectured that this list is complete.
d=1 for A006093;
d=4 for A172367;
d=9 for n: 8, 14, 20, 32, 34, 38, 44, 50, 62, 64, 74, 80, 92, 94, 98, 104, 118, 122, 128, 140, 142, 154, 158, ..., ;
d=16 for n: 21, 31, 45, 51, 73, 81, 87, 91, 111, 115, 121, 141, 151, 157, 165, 181, 183, 211, 213, 217, 241, ..., ;
d=25 for n: 48, 54, 76, 84, 114, 124, 132, 168, 174, 186, 204, 208, 216, 244, 246, 252, 258, 286, 288, 324, ..., ;
d=36 for n: 11, 17, 23, 35, 47, 53, 61, 65, 71, 77, 95, 101, 113, 131, 137, 143, 155, 161, 191, 197, 203, 205, ..., ;
d=49 for n: 24, 90, 144, 234, 264, 300, 318, 360, 390, 450, 472, 492, 528, 550, 558, 564, 624, 670, 678, 712, ..., ;
and for the nonsquare differences of 24, 132, 258, 1032, 1167, 1518, 2103, 2472, 2652, 2706 and 5793l, their n's are 5, 41, 59, 341, 314, 479, 626, 749, 881, 755 and 1784, respectively.
Least n that has as its difference k^2: 1, 3, 8, 21, 48, 11, 24, 117, 26, 139, 120, 29, 294, 201, 134, 621, 468, 179, 792, 1269, 356, 1249, 754, 251, 696, ..., .

Examples

			a(1) = 2 since it equals 1^2+1*1^2;
a(2) = 3 since it equals 1^2+2*1^2;
a(3) = 7 since it equals 2^2+3*1^2;
a(4) = 5 since it equals 1^2+4*1^2;
a(5) = 29 since it equals 3^2+5*2^2; etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = NextPrime@ n, y}, While[y = 1; While[p > n*y^2 && !IntegerQ[ Sqrt[p - n*y^2]], y++]; !IntegerQ[ Sqrt[p - n*y^2]], p = NextPrime@ p]; p]; Array[f, 70]
  • PARI
    a(n)=if(n==1, return(2)); my(best,x=1+n%2,t); while(!isprime(best=x^2+n), x += 2); for(y=2,sqrtint((best-2)\n), t=best-n*y^2; if(t<1, return(best)); for(x=1,sqrtint(t), if(isprime(t=x^2+n*y^2) && tCharles R Greathouse IV, Jul 17 2016

Formula

a(n-1) = n iff n is prime.

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jun 03 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 16, 20, 22, 28, 42, 50.
We have verified a(n) > 0 for all n = 2..10^7.
See also A232174 for a similar conjecture.

Examples

			a(2) = 1 since 2 = 1 + 1 with 1^3 + 2*1^2 = 3 prime.
a(3) = 1 since 3 = 1 + 2 with 1^3 + 3*2^2 = 13 prime.
a(11) = 1 since 11 = 5 + 6 with 5^3 + 11*6^2 = 521 prime.
a(20) = 1 since 20 = 3 + 17 with 3^3 + 20*17^2 = 5807 prime.
a(28) = 1 since 28 = 9 + 19 with 9^3 + 28*19^2 = 10837 prime.
a(42) = 1 since 42 = 19 + 23 with 19^3 + 42*23^2 = 29077 prime.
a(50) = 1 since 50 = 3 + 47 with 3^3 + 50*47^2 = 110477 prime.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[PrimeQ[x^3+n(n-x)^2],r=r+1],{x,1,n/2}];tab=Append[tab,r],{n,1,90}];Print[tab]

A334838 Positive integers m with prime(m) in the form x^2 + m*y^2, where x and y are positive integers.

Original entry on oeis.org

1, 2, 12, 35, 37, 77, 97, 100, 118, 136, 137, 152, 183, 184, 190, 212, 231, 258, 290, 352, 421, 462, 482, 487, 690, 730, 741, 960, 1110, 1111, 1168, 1169, 1227, 1285, 1328, 1396, 1417, 1621, 2074, 2119, 2318, 2578, 2603, 2652, 2707, 2726, 2737, 2772, 2776, 2788, 2803, 2853, 2857, 2865, 2882, 2892, 3035, 3176, 3199, 3245
Offset: 1

Views

Author

Zhi-Wei Sun, May 13 2020

Keywords

Comments

Conjecture: The current sequence has infinitely many terms.
This was first mentioned in Remark 2.21 of the linked 2017 paper.

Examples

			a(2) = 2 with prime(2) = 3 = 1^2 + 2*1^2.
a(3) = 12 with prime(12) = 37 = 5^2 + 12*1^2.
a(4) = 35 with prime(35) = 149 = 3^2 + 35*2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=n>0&&IntegerQ[Sqrt[n]];
    tab={};Do[Do[If[SQ[Prime[m]-m*x^2],tab=Append[tab,m];Goto[aa]],{x,1,Sqrt[Prime[m]/m]}];Label[aa],{m,1,3245}];tab
Showing 1-8 of 8 results.