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.

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]