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

A262813 Number of ordered ways to write n as x^3 + y^2 + z*(z+1)/2 with x >= 0, y >=0 and z > 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 03 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 9, 21, 35, 98, 152, 306.
This has been verified for all n = 1..2*10^7.
Conjecture verified up to 10^11. - Mauro Fiorentini, Jul 18 2023
If z >= 0, a(n) = 1 only for n = 21, 35, 98, 306. - Mauro Fiorentini, Jul 20 2023
In contrast with the conjecture, in 2015 the author refined a result of Euler by proving that any positive integer can be written as the sum of two squares and a positive triangular number.
See also A262815, A262816 and A262941 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0^3 + 0^2 + 1*2/2.
a(2) = 2 since 2 = 0^3 + 1^2 + 1*2/2 = 1^3 + 0^2 + 1*2/2.
a(6) = 2 since 6 = 0^3 + 0^2 + 3*4/2 = 1^3 + 2^2 + 1*2/2.
a(9) = 1 since 9 = 2^3 + 0^2 + 1*2/2.
a(21) = 1 since 21 = 0^3 + 0^2 + 6*7/2.
a(35) = 1 since 35 = 0^3 + 5^2 + 4*5/2.
a(98) = 1 since 98 = 3^3 + 4^2 + 10*11/2.
a(152) = 1 since 152 = 0^3 + 4^2 + 16*17/2.
a(306) = 1 since 306 = 1^3 + 13^2 + 16*17/2.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
    Do[r=0;Do[If[TQ[n-x^3-y^2],r=r+1],{x,0,n^(1/3)},{y,0,Sqrt[n-x^3]}];Print[n," ",r];Continue,{n,1,100}]

A263998 Number of ordered ways to write n as x^2 + 2*y^2 + p*(p+d)/2, where x and y are nonnegative integers, d is 1 or -1, and p is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 31 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 8.
This is similar to the conjecture in A262785.

Examples

			 a(1) = 1 since 1 = 0^2 + 2*0^2 + 2*(2-1)/2 with 2 prime.
a(2) = 1 since 2 = 1^2 + 2*0^2 + 2*(2-1)/2 with 2 prime.
a(8) = 1 since 8 = 0^2 + 2*1^2 + 3*(3+1)/2 with 3 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    f[d_, n_]:=f[d,n]=Prime[n](Prime[n]+(-1)^d)/2
    Do[r=0; Do[If[SQ[n-f[d, k]-2x^2], r=r+1], {d, 0, 1}, {k, 1, PrimePi[(Sqrt[8n+1]-(-1)^d)/2]}, {x, 0, Sqrt[(n-f[d, k])/2]}]; Print[n, " ", r]; Continue, {n, 1, 100}]

A262887 Number of ordered ways to write n as x^3 + y^2 + pi(z^2) (x >= 0, y >= 0 and z > 0) with z-1 or z+1 prime, where pi(m) denotes the number of primes not exceeding m.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 04 2015

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 0. Also, each natural number can be written as x^2 + y^2 + pi(z^2) (0 <= x <= y and z > 0) with z-1 or z+1 prime.
(ii) Any integer n > 1 can be written as x^3 + y^2 + pi(z^2) with x >= 0, y >= 0 and z > 0 such that y or z is prime.
(iii) Any integer n > 1 can be written as x^3 + pi(y^2) + pi(z^2) (x >= 0, y > 0 and z > 0) with y or z prime. Also, each integer n > 1 can be written as x^2 + pi(p^2) + pi(q^2) (x >= 0 and p >= q > 0) with p prime.
Compare these conjectures with the conjectures in A262746.

Examples

			a(22) = 2 since 22 = 0^3 + 4^2 + pi(4^2) = 0^3 + 2^2 + pi(8^2) with 4+1 = 5 and 8-1 = 7 both prime.
a(24) = 1 since 24 = 2^3 + 4^2 + pi(1^2) with 1+1 = 2 prime.
a(40) = 2 since 40 = 0^3 + 6^2 + pi(3^2) = 3^3 + 3^2 + pi(3^2) with 3-1 = 2 prime.
a(57) = 1 since 57 = 2^3 + 7^2 + pi(1^2) with 1+1 = 2 prime.
a(73) = 1 since 73 = 4^3 + 3^2 + pi(1^2) with 1+1 = 2 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    f[n_]:=PrimePi[n^2]
    Do[r=0;Do[If[f[k]>n,Goto[aa]];If[PrimeQ[k-1]==False&&PrimeQ[k+1]==False,Goto[bb]];Do[If[SQ[n-f[k]-x^3],r=r+1],{x,0,(n-f[k])^(1/3)}];Label[bb];Continue,{k,1,n}];Label[aa];Print[n," ",r];Continue, {n,1,100}]

A262982 Number of ordered ways to write n as x^4 + phi(y^2) + z*(z+1)/2 with x >= 0, y > 0 and z > 0, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 6, 20, 26, 40, 82, 89, 105, 305, 416, 470, 725, 6135, 25430, 90285.
Compare this with the conjectures in A262311, A262785 and A262813.

Examples

			a(2) = 1 since 1 = 0^4 + phi(1^2) + 1*2/2.
a(6) = 1 since 6 = 1^4 + phi(2^2) + 2*3/2.
a(20) = 1 since 20 = 2^4 + phi(1^2) + 2*3/2.
a(26) = 1 since 26 = 0^4 + phi(5^2) + 3*4/2.
a(40) = 1 since 40 = 0^4 + phi(6^2) + 7*8/2.
a(82) = 1 since 82 = 0^4 + phi(9^2) + 7*8/2.
a(89) = 1 since 89 = 3^4 + phi(2^2) + 3*4/2.
a(105) = 1 since 105 = 0^4 + phi(14^2) + 6*7/2.
a(305) = 1 since 305 = 4^4 + phi(12^2) + 1*2/2.
a(416) = 1 since 416 = 4^4 + phi(10^2) + 15*16/2.
a(470) = 1 since 470 = 2^4 + phi(12^2) + 28*29/2.
a(725) = 1 since 725 = 2^4 + phi(3^2) + 37*38/2.
a(6135) = 1 since 6135 = 6^4 + phi(81^2) + 30*31/2.
a(25430) = 1 since 25430 = 5^4 + phi(152^2) + 166*167/2.
a(90285) = 1 since 90285 = 16^4 + phi(212^2) + 73*74/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=EulerPhi[n^2]
    TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
    Do[r=0;Do[If[f[x]>n,Goto[aa]];Do[If[TQ[n-f[x]-y^4],r=r+1],{y,0,(n-f[x])^(1/4)}];Label[aa];Continue,{x,1,n}];Print[n," ",r];Continue,{n,1,100}]

A264010 Number of ways to write n as x^2 + y*(y+1) + z*(z+1)/2, where x, y and z are nonnegative integers such that y or y+1 is prime, and z or z+1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 31 2015

Keywords

Comments

Conjectures: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 4, 5, 6, 10, 11, 15, 20, 29, 1125.
(ii) Any integer n > 2 can be written as x*(x+1) + y*(y+1)/2 + z*(z+1)/2, where x, y and z are nonnegative integers such that x or x+1 is prime, and y or y+1 is prime.
(iii) Any integer n > 7 can be written as x*(x+1) + y*(y+1)/2 + 3*z*(z+1)/2, where x, y and z are nonnegative integers such that y or y+1 is prime, and z or z+1 is prime.
It is known that any natural number can be written as x^2 + y*(y+1)+ z*(z+1)/2 (or x*(x+1) + y*(y+1)/2 + z*(z+1)/2, or x*(x+1) + y*(y+1)/2 + 3*z(z+1)/2) with x, y and z nonnegative integers.
See also A264025 for similar conjectures.

Examples

			a(5) = 1 since 5 = 0^2 + 1*2 + 2*3/2 with 2 prime.
a(6) = 1 since 6 = 1^2 + 1*2 + 2*3/2 with 2 prime.
a(10) = 1 since 10 = 1^2 + 2*3 + 2*3/2 with 2 prime.
a(11) = 1 since 11 = 2^2 + 2*3 + 1*2/2 with 2 prime.
a(15) = 1 since 15 = 0^2 + 3*4 + 2*3/2 with 3 prime.
a(20) = 1 since 20 = 2^2 + 2*3 + 4*5/2 with 2 and 5 both prime.
a(29) = 1 since 29 = 4^2 + 3*4 + 1*2/2 with 3 and 2 both prime.
a(1125) = 1 since 1125 = 33^2 + 5*6 + 3*4/2 with 5 and 3 both prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[(PrimeQ[y]||PrimeQ[y+1])==False,Goto[aa]];Do[If[(PrimeQ[z]||PrimeQ[z+1])&&SQ[n-y(y+1)-z(z+1)/2],r=r+1],{z,1,(Sqrt[8(n-y(y+1))+1]-1)/2}];Label[aa];Continue,{y,1,(Sqrt[4n+1]-1)/2}];Print[n, " ", r];Continue, {n,1,100}]

A264025 Number of ways to write n as x^2 + y*(2*y+1) + z*(z+1)/2 where x, y and z are nonnegative integers with z or z+1 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 01 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 3, 8, 9, 23, 30, 44, 48, 198, 219, 1344.
(ii) Any positive integer n not equal to 8 can be written as x*(2*x+1) + y*(y+1)/2 + z*(z+1)/2, where x, y and z are nonnegative integers with z or z+1 prime.
(iii) Any integer n > 1 can be written as x^2 + y*(y+1) + z*(z+1) (or 2*x^2 + y*(y+1)/2 + z*(z+1)), where x, y and z are nonnegative integers with z or z+1 prime.
(iv) Each integer n > 2 can be written as x^2 + y*(y+1)/2 + 3*z*(z+1)/2, where x, y and z are nonnegative integers with z or z+1 prime.
(v) Every n = 1,2,3,... can be written as 2*x^2 + y*(y+1)/2 + z*(z+1)/2, where x, y and z are nonnegative integers with z or z+1 prime. Also, any integer n > 4 can be written as 2*x^2 + y*(y+1) + z*(z+1)/2, where x, y and z are nonnegative integers with z or z+1 prime.
Note that the integers n*(2*n+1) = 2n*(2n+1)/2 (n = 0,1,2,...) are second hexagonal numbers.
See also A262785, A263998 and A264010 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0^2 + 0*(2*0+1) + 1*2/2 with 2 prime.
a(2) = 1 since 2 = 1^2 + 0*(2*0+1) + 1*2/2 with 2 prime.
a(3) = 1 since 3 = 0^2 + 0*(2*0+1) + 2*3/2 with 2 prime.
a(8) = 1 since 8 = 2^2 + 1*(2*1+1) + 1*2/2 with 2 prime.
a(9) = 1 since 9 = 0^2 + 1*(2*1+1) + 3*4/2 with 3 prime.
a(23) = 1 since 23 = 1^2 + 3*(2*3+1) + 1*2/2 with 2 prime.
a(30) = 1 since 30 = 3^2 + 0*(2*0+1) + 6*7/2 with 7 prime.
a(44) = 1 since 44 = 4^2 + 0*(2*0+1) + 7*8/2 with 7 prime.
a(48) = 1 since 48 = 3^2 + 4*(2*4+1) + 2*3/2 with 2 prime.
a(198) = 1 since 198 = 3^2 + 4*(2*4+1) + 17*18/2 with 17 prime.
a(219) = 1 since 219 = 6^2 + 7*(2*7+1) + 12*13/2 with 13 prime.
a(1344) = 1 since 1344 = 21^2 + 0*(2*0+1) + 42*43/2 with 43 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[(PrimeQ[z]||PrimeQ[z+1])==False,Goto[aa]];Do[If[SQ[n-z(z+1)/2-y(2y+1)],r=r+1],{y,0,(Sqrt[8(n-z(z+1)/2)+1]-1)/4}];Label[aa];Continue,{z,1,(Sqrt[8n+1]-1)/2}];Print[n, " ", r];Continue, {n,1,100}]
Showing 1-6 of 6 results.