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

A271325 Number of ordered ways to write n as x^3 + y^2 + z*(3z+1), where x, y and z are integers with x positive and y nonnegative.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 4, 1, 2, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 1, 4, 3, 3, 2, 2, 5, 3, 3, 2, 3, 3, 3, 4, 2, 3, 5, 2, 2, 1, 3, 3, 5, 2, 1, 3, 2, 4, 3, 6, 1, 3, 5, 2, 1, 3, 6, 2, 2, 3, 3, 3, 6, 4, 4, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 04 2016

Keywords

Comments

We guess that a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 3, 4, 6, 7, 8, 13, 18, 20, 23, 25, 44, 49, 55, 59, 121, 238.
Based on our computation, we propose the following general conjecture (which extends the conjectures in A262813 and A270469).
Conjecture: Let T(x) = x*(x+1)/2 and pen(x) = x*(3x+1)/2. Every natural number can be written as P(x,y,z) with x a nonnegative integer and y and z integers, where P(x,y,z) is any of the following cubic polynomials: x^3+T(y)+z^2, a*x^3+T(y)+pen(z) (a = 1,2,3,4), x^3+T(y)+z*(5z+1)/2, x^3+T(y)+z*(3z+r) (r = 1,2), x^3+T(y)+z*(7z+3)/2, x^3+T(y)+z*(9z+j)/2 (j = 5,7), x^3+T(y)+z*(5z+r) (r = 2,3), x^3+T(y)+2z*(3z+r) (r = 1,2), x^3+T(y)+z*(6z+5), x^3+T(y)+z*(13z+j)/2 (j = 3,7,9), x^3+T(y)+z*(7z+k) (k = 2,6), a*x^3+y^2+pen(z) (a = 1,2,3,4), x^3+y^2+z*(5z+3)/2, x^3+y^2+2*pen(z), x^3+2*T(y)+pen(z), x^3+2*T(y)+z(5z+j)/2 (j = 1,3), a*x^3+2*T(y)+z*(3z+2) (a = 1,2,3), x^3+2*T(y)+z*(7z+3)/2, x^3+4*T(y)+pen(z), x^3+2y^2+pen(z), x^3+pen(y)+c*pen(z) (c = 1,2,3,4), x^3+b*pen(y)+z*(5z+j)/2 (b = 1,2; j = 1,3), x^3+pen(y)+z*(7z+k)/2 (k = 1,3,5), x^3+pen(y)+z*(4z+j) (j = 1,3), x^3+pen(y)+z*(9z+5)/2, a*x^3+pen(y)+z*(9z+r)/2 (a = 1,2; r = 1,7), x^3+pen(y)+z*(5z+r) (r = 1,2,3,4), a*x^3+pen(y)+z*(11z+9)/2 (a = 1,2), x^3+pen(y)+2z*(3z+2),x^3+pen(y)+z*(13z+11)/2, x^3+pen(y)+z*(7z+k) (k = 4,5,6), x^3+pen(y)+3z*(5z+3)/2, x^3+pen(y)+z*(15z+11)/2, x^3+pen(y)+z*(8z+7), x^3+pen(y)+z*(11z+7), x^3+2*pen(y)+z*(7z+j)/2 (j = 1,5), x^3+2*pen(y)+3*pen(z), x^3+2*pen(y)+z*(4z+1), x^3+2*pen(y)+z*(7z+2), x^3+y*(5y+j)/2+z*(7z+k)/2 (j = 1,3; k = 3,5), x^3+y*(5y+3)/2+z*(9z+7)/2, x^3+y*(3y+2)+z*(4z+1), x^3+y*(3y+2)+z*(5z+1)/2, x^3+y*(7y+3)/2+z*(7z+5)/2, 2x^3+T(y)+z*(5z+3)/2, 2x^3+T(y)+z*(3z+r) (r = 1,2), 2x^3+T(y)+z*(5z+4), 2x^3+2*T(y)+z*(5z+3)/2, 2x^3+3*T(y)+pen(z), 2x^3+y^2+2*pen(z), 2x^3+pen(y)+pen(z), a*x^3+pen(y)+3*pen(z) (a = 2,3,4), a*x^3+pen(y)+z*(7z+5)/2 (a = 2,3,4), 2x^3+pen(y)+z*(5z+k) (k = 1,3), 2x^3+y*(5y+3)/2+z*(7z+5)/2, 2x^3+2*pen(y)+z*(3z+2), 2x^3+2*pen(y)+z*(7z+5)/2, 2x^3+y*(3y+2)+z*(4z+3), 3x^3+pen(y)+z*(7z+3)/2, 4x^3+y^2+z*(5z+1)/2, 4x^3+pen(y)+z*(4z+3).
The listed ternary polynomials in the conjecture should exhaust all those P(x,y,z) = a*x^3+y*(s*y+t)/2+z*(u*z+v)/2 with a,s,u > 0, 0 <= t <= s, 0 <= v <= u, s == t (mod 2), u == v (mod 2), and (s-2t)*(u-2v) nonzero, such that any natural number can be written as P(x,y,z) with x a nonnegative integer and y and z integers. Note that those numbers y*(2y+1) with y integral are just triangular numbers.
Conjecture verified for all polynomials up to 10^11. - Mauro Fiorentini, Aug 03 2023
See also A271106 for another general conjecture on universal sums.

Examples

			a(13) = 1 since 13 = 2^3 + 1^2 + 1*(3*1+1).
a(18) = 1 since 18 = 2^3 + 0^2 + (-2)*(3*(-2)+1).
a(20) = 1 since 20 = 1^3 + 3^2 + (-2)*(3*(-2)+1).
a(23) = 1 since 23 = 2^3 + 1^2 + 2*(3*2+1).
a(25) = 1 since 25 = 1^3 + 0^2 + (-3)*(3*(-3)+1).
a(44) = 1 since 44 = 2^3 + 6^2 + 0*(3*0+1).
a(49) = 1 since 49 = 1^3 + 2^2 + (-4)*(3*(-4)+1).
a(55) = 1 since 55 = 3^3+ 2^2 + (-3)*(3*(-3)+1).
a(59) = 1 since 59 = 2^3 + 7^2 + (-1)*(3*(-1)+1).
a(121) = 1 since 121 = 3^3 + 8^2 + 3*(3*3+1).
a(238) = 1 since 238 = 4^3 + 12^2 + 3*(3*3+1).
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[Sqrt[12n+1]]
    Do[r=0;Do[If[pQ[n-x^3-y^2],r=r+1],{x,1,n^(1/3)},{y,0,Sqrt[n-x^3]}];Print[n," ",r];Label[aa];Continue,{n,1,70}]

A270616 Number of ordered ways to write n as the sum of a positive square, the square of a triangular number, and a generalized pentagonal number (A001318).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 20 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 8, 29, 34, 5949, 10913.
See also A270566 and A270594 for more similar conjectures.
By the author's work in Sci. China Math. 58(2015), any natural number can be written as the sum of a triangular number, a square and a generalized pentagonal number.

Examples

			a(1) = 1 since 1 = 1^2 + (0*1/2)^2 + 0*(3*0+1)/2.
a(8) = 1 since 8 = 1^2 + (0*1/2)^2 + 2*(3*2+1)/2.
a(29) = 1 since 29 = 4^2 + (1*2/2)^2 + 3*(3*3-1)/2.
a(34) = 1 since 34 = 5^2 + (2*3/2)^2 + 0*(3*0+1)/2.
a(5949) = 1 since 5949 = 47^2 + (10*11/2)^2 + 22*(3*22-1)/2.
a(10913) = 1 since 10913 = 23^2 + (2*3/2)^2 +83*(3*83+1)/2.
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[pQ[n-x^2-(y(y+1)/2)^2],r=r+1],{x,1,Sqrt[n]},{y,0,(Sqrt[8*Sqrt[n-x^2]+1]-1)/2}];Print[n," ",r];Continue,{n,1,80}]

A270705 Number of ordered ways to write n as x^2*pen(x) + pen(y) + pen(z) with pen(x) = x*(3x+1)/2 and pen(y) <= pen(z), where x, y and z are integers ("pen" stands for "pentagonal").

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 21 2016

Keywords

Comments

Conjecture: (i) Any natural number can be written as a*x^2*pen(x) + b*pen(y) + c*pen(z) with x, y and z integers, provided that (a,b,c) is among the following ordered triples: (j,1,k) (j = 1,2; k = 1,2,3,4), (1,2,3), (3,1,4) and (4,1,3).
(ii) Every n = 0,1,2,... can be expressed as x^2*pen(x) + T(y) + T(z) with x, y and z integers, where T(m) denotes the triangular number m*(m+1)/2. Also, for each (a,b) = (1,2),(1,4),(2,2), any natural number can be written as a*x^2*T(x) + b*T(y) + T(z) with x, y and z integers.
(iii) Each natural number can be written as x^2*P(x) + pen(y) + pen(z) with x, y and z integers, where P(x) is either of the following polynomials: a*T(x) (a = 1,2,3,4,5), x*(5x+3)/2, x*(3x+1), x*(3x+2), x*(7x+1)/2, x*(4x+1), x*(4x+3), x*(9x+5)/2, x*(5x+3), x*(11x+9)/2, x*(13x+5)/2, x*(17x+9)/2, 3x*(3x+2), x*(11x+2).
See also A270594 and A270706 for other similar conjectures.

Examples

			a(88) = 1 since 88 = 1^2*pen(1) + pen(-5) + pen(-6).
		

Crossrefs

Programs

  • Mathematica
    pen[x_]:=pen[x]=x(3x+1)/2
    pQ[n_]:=pQ[n]=IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[pQ[n-pen[y]-x^2*pen[x]],r=r+1],{y,-Floor[(Sqrt[12n+1]+1)/6],(Sqrt[12n+1]-1)/6},{x,-1-Floor[(2(n-pen[y])/3)^(1/4)],(2(n-pen[y])/3)^(1/4)}];Print[n," ",r];Continue,{n,0,90}]

A270706 Number of ordered ways to write n as x^2*T(x) + y^2 + T(z), where x, y and z are integers with x nonzero, y positive and z nonnegative, and T(m) denotes the triangular number m*(m+1)/2.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 21 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 90, 438, 480, 7108.
(ii) Let pen(x) = x*(3x+1)/2. Any natural number can be written as a*f(x)*g(x) + f(y) + g(z) with x, y and z integers, whenever (a,f(x),g(x)) is among the following ordered triples: (1,T(x),x^2), (1,T(x),pen(x)), (1,T(x),x*(5x+1)/2), (1,T(x),x*(5x+3)/2), (1,T(x),x*(3x+j)) (j = 1,2), (1,pen(x),3*T(x)), (1,pen(x),x*(7x+j)/2) (j = 1,3,5), (1,pen(x),x*(4x+1)), (2,T(x),x^2), (2,T(x),pen(x)), (2,T(x),x(5x+j)/2) (j = 1,3), (2,T(x),x*(3x+j)) (j = 1,2), (2,2*T(x),pen(x)), (2,pen(x),x(7x+j)/2) (j = 3,5), (k,x^2,pen(x)) (k = 1,2,3,4,5,8,11).
(iii) Each natural number can be written as P(x,y,z) with x, y and z integers, where P(x,y,z) is either of the following polynomials: T(x)*x(5x+1)/2+T(y)+2*T(z), a*T(x)*pen(x)+pen(y)+pen(z) (a = 1,2,3,4), T(x)*pen(x)+pen(y)+3*pen(z), T(x)*pen(x)+pen(y)+4*pen(z), 2*T(x)*pen(x)+pen(y)+3*pen(z), pen(x)*x(5x+j)/2+pen(y)+3*pen(z) (j = 1,3), x(3x+2)*pen(x)+pen(y)+4*pen(z), pen(x)*x(7x+1)/2+pen(y)+pen(z), pen(x)*x(9x+7)/2+pen(y)+pen(z).
See also A270594 and A270705 for some other similar conjectures.

Examples

			a(1) = 1 since 1 = (-1)^2*T(-1) + 1^2 + T(0).
a(3) = 1 since 3 = 1^2*T(1) + 1^2 + T(1).
a(90) = 1 since 90 = 3^2*T(3) + 6^2 + T(0).
a(438) = 1 since 438 = 4^2*T(4) + 5^2 + T(22).
a(480) = 1 since 480 = 1^2*T(1) + 17^2 + T(19).
a(7108) = 1 since 1^2*T(1) + 69^2 + T(68).
		

Crossrefs

Programs

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

A270921 Number of ordered ways to write n as x*(3x+2) + y*(5y+1)/2 - z^4, where x and y are integers, and z is a nonnegative integer with z^4 <= n.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 25 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 0, 5, 6, 12, 13, 14, 112, 193, 194, 200, 242, 333, 345, 376, 492, 528, 550, 551, 613, 797, 1178, 1195, 1222, 1663, 3380, 3635, 6508, 8755, 9132, 12434, 20087.
Compare this conjecture with the conjecture in A270566.

Examples

			a(5) = 1 since 5 = 1*(3*1+2) + 0*(5*0+1)/2 - 0^4.
a(6) = 1 since 6 = 1*(3*1+2) + (-1)*(5*(-1)+1)/2 - 1^4.
a(13) = 1 since 13 = 1*(3*1+2) + (-2)*(5*(-2)+1)/2 - 1^4.
a(376) = 1 since 376 = 0*(3*0+2) + (-16)*(5*(-16)+1)/2 - 4^4.
a(9132) = 1 since 9132 = (-13)*(3*(-13)+2) + 59*(5*59+1)/2 - 3^4.
a(12434) = 1 since 12434 = (-21)*(3*(-21)+2) + 78*(5*78+1)/2 - 8^4.
a(20087) = 1 since 20087 = 19*(3*19+2) + 87*(5*87+1)/2 - 0^4.
5, 6, 12, 13, 14, 112, 193, 194, 200, 242, 333, 345, 376, 492, 528, 550, 551, 613, 797, 1178, 1195, 1222, 1663, 3380, 3635, 6508, 8755, 9132, 12434, 20087
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[Sqrt[40n+1]]&&(Mod[Sqrt[40n+1],10]==1||Mod[Sqrt[40n+1],10]==9)
    Do[r=0;Do[If[pQ[n+x^4-y(3y+2)],r=r+1],{x,0,n^(1/4)},{y,-Floor[(Sqrt[3(n+x^4)+1]+1)/3],(Sqrt[3(n+x^4)+1]-1)/3}];Print[n," ",r];Continue,{n,0,80}]

A270928 Number of ways to write n = x*(x-1)/2 + y*(y-1)/2 + z*(z-1)/2, where 0 < x <= y <= z, and one of x, y, z is prime.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 3, 2, 1, 2, 1, 3, 3, 2, 2, 2, 2, 2, 2, 1, 3, 4, 2, 2, 2, 2, 1, 4, 2, 3, 2, 2, 3, 2, 2, 2, 4, 2, 3, 3, 1, 2, 5, 1, 2, 3, 3, 4, 3, 3, 1, 5, 1, 3, 2, 3, 3, 5, 2, 2, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 26 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for n > 0 with the only exception n = 15^2 = 225. Also, a(n) = 1 only for n = 1, 2, 4, 5, 6, 8, 11, 14, 15, 18, 20, 29, 36, 50, 53, 60, 62, 96, 117, 119, 218, 411, 540, 645, 1125, 1590, 2346, 4068.
(ii) Any positive integer can be written as p*(p-1)/2 + x*(x-1)/2 + P(y) with p prime and x and y integers, where the polynomial P(y) is either of the following ones: y*(y-1), y*(3*y+1)/2, y*(5*y+j)/2 (j = 1,3), y*(3*y+j) (j = 1,2), y*(7*y+3)/2, y*(9*y+j)/2 (j = 1,5,7), y*(5*y+j) (j = 1,3), y*(11*y+9)/2, 2*y*(3*y+j) (j = 1,2), y*(7*y+3).
(iii) Any positive integer can be written as p*(p-1)/2 + P(x,y) with p prime and x and y integers, where the polynomial P(x,y) is either of the following ones: a*x*(x-1)/2+y*(3*y+1)/2 (a = 2,3,4), x*(x-1)+y*(5*y+3)/2, b*x^2+y*(3*y+1)/2 (b = 1,2,3), x^2+y*(5*y+j)/2 (j = 1,3), x^2+y*(3*y+1), x^2+y*(7*y+j)/2 (j = 1,3,5), x^2+y*(4*y+1).
(iv) Every positive integer can be written as p*(p-1)/2+x*(3*x+1)/2+y*(3*y+1)/2 with p prime, x an nonnegative integer and y an integer. Also, for each r = 1,3, any positive integer n can be written as p*(p-1)/2+x*(3*x-1)/2+y*(5*y+r)/2, where p is a prime, and x and y are integers with x nonnegative.
Note that Gauss proved a classical assertion of Fermat which states that any natural number is the sum of three triangular numbers.
See also A270966 for a similar conjecture involving (p-1)^2 with p prime.
The conjecture that a(n) > 0 except for n = 225 appeared as Conjecture 1.2(i) of the author's JNT paper in the links.

Examples

			a(1) = 1 since 1 = 1*(1-1)/2 + 1*(1-1)/2 + 2*(2-1)/2 with 2 prime.
a(4) = 1 since 4 = 1*(1-1)/2 + 2*(2-1)/2 + 3*(3-1)/2 with 2 and 3 prime.
a(29) = 1 since 29 = 1*(1-1)/2 + 2*(2-1)/2 + 8*(8-1)/2 with 2 prime.
a(50) = 1 since 50 = 2*(2-1)/2 + 7*(7-1)/2 + 8*(8-1)/2 with 2 and 7 prime.
a(119) = 1 since 119 = 8*(8-1)/2 + 9*(9-1)/2 + 11*(11-1)/2 with 11 prime.
a(411) = 1 since 411 = 16*(16-1)/2 + 16*(16-1)/2 + 19*(19-1)/2 with 19 prime.
a(1125) = 1 since 1125 = 3*(3-1)/2 + 34*(34-1)/2 + 34*(34-1)/2 with 3 prime.
a(1590) = 1 since 1590 = 7*(7-1)/2 + 37*(37-1)/2 + 43*(43-1)/2 with 7, 37 and 43 prime.
a(2346) = 1 since 2346 = 6*(6-1)/2 + 16*(16-1)/2 + 67*(67-1)/2 with 67 prime.
a(4068) = 1 since 4068 = 7*(7-1)/2 + 34*(34-1)/2 + 84*(84-1)/2 with 7 prime.
		

Crossrefs

Programs

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

A270966 Number of ways to write n as x^2 + y^2 + z*(3z+1)/2, where x, y and z are integers with 0 <= x <= y such that x or y has the form p-1 with p prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 27 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 49, 608.
(ii) Let T(x) = x*(x+1)/2 and pen(x) = x*(3x+1)/2. Any positive integer can be written as (p-1)^2+P(x,y) with p prime and x and y integral, where the polynomial P(x,y) is either of the following ones: T(x)+2*pen(y), 2*T(x)+pen(y), T(x)+y*(5y+1)/2, T(x)+y*(9y+5)/2, pen(x)+y*(5y+j)/2 (j = 1,3), pen(x)+y*(7y+k)/2 (k = 3,5), pen(x)+y*(4y+j) (j = 1,3), pen(x)+y*(5y+r) (r = 1,2,3,4), pen(x)+2y*(3y+i) (i = 1,2), pen(x)+6*pen(y), x*(5x+1)/2+y*(3y+2), x*(5x+1)/2+y*(9y+7)/2, x*(5x+3)/2+y*(3y+i) (i = 1,2), x*(5x+3)/2+y*(9y+5)/2.
See also A270928 for a similar conjecture involving T(p-1) = p*(p-1)/2 with p prime.

Examples

			a(1) = 1 since 1 = 0^2 + (2-1)^2 + 0*(3*0+1)/2 with 2 prime.
a(12) = 2 since 12 = (2-1)^2 + 2^2 + 2*(2*3+1)/2 = (2-1)^2 + 3^2 + 1*(3*1+1)/2 with 2 prime.
a(49) = 1 since 49 = (2-1)^2 + 6^2 + (-3)*(3*(-3)+1)/2 with 2 prime.
a(608) = 1 since 608 = (7-1)^2 + 14^2 + (-16)*(3*(-16)+1)/2 with 7 prime.
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[(PrimeQ[x+1]||PrimeQ[y+1])&&pQ[n-x^2-y^2],r=r+1],{x,0,Sqrt[n/2]},{y,x,Sqrt[n-x^2]}];Print[n," ",r];Continue,{n,1,70}]

A338696 Number of ways to write n as x^3 + y^2 + z*(3*z+2), where x and y are nonnegative integers, and z is an integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 24 2021

Keywords

Comments

Conjecture: a(n) > 0 except for n = 19.
We have verified this for n up to 5*10^6.
As z*(3*z+2) = floor((3*z+1)^2/3) and 19 = 0^3 + 4^2 + floor(3^2/3), the conjecture implies that each n = 0,1,... can be written as x^3 + y^2 + floor(z^2/3) with x,y,z nonnegative integers.

Examples

			a(63) = 1 with 63 = 3^3 + 6^2 + 0*(3*0+2).
a(327) = 1 with 327 = 5^3 + 13^2 + 3*(3*3+2).
a(478) = 1 with 478 = 6^3 + 1^2 + 9*(3*9+2).
a(847) = 1 with 847 = 1^3 + 29^2 + 1*(3*1+2).
a(1043) = 1 with 1043 = 3^3 + 20^2 + 14*(3*14+2).
a(3175) = 1 with 3175 = 5^3 + 35^2 + (-25)*(3*(-25)+2).
		

Crossrefs

Programs

  • Mathematica
    OctQ[n_]:=OctQ[n]=IntegerQ[Sqrt[3n+1]];
    tab={};Do[r=0;Do[If[OctQ[n-x^3-y^2],r=r+1],{x,0,n^(1/3)},{y,0,Sqrt[n-x^3]}];tab=Append[tab,r],{n,1,100}];Print[tab]
Previous Showing 11-18 of 18 results.