A262816 Number of ordered ways to write n as x^3 + y^2 + z*(3*z-1)/2, where x and y are nonnegative integers, and z is a nonzero integer.
1, 3, 3, 1, 2, 4, 3, 2, 3, 4, 4, 3, 4, 4, 3, 5, 5, 3, 4, 2, 3, 4, 4, 6, 2, 4, 6, 4, 5, 4, 6, 6, 3, 4, 5, 5, 4, 8, 6, 5, 5, 4, 7, 5, 5, 3, 2, 6, 5, 5, 8, 8, 4, 3, 4, 4, 6, 6, 8, 3, 4, 6, 3, 5, 7, 9, 6, 5, 6, 6, 8, 6, 4, 6, 6, 6, 7, 9, 9, 5, 4, 6, 7, 6, 6, 6, 11, 5, 4, 7, 5, 5, 7, 11, 4, 6, 4, 5, 3, 6
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 0^3 + 0^2 + 1*(3*1-1)/2. a(4) = 1 since 4 = 1^3 + 1^2 + (-1)*(3*(-1)-1)/2. a(8) = 2 since 8 = 0^3 + 1^2 + (-2)*(3*(-2)-1)/2 = 1^3 + 0^2 + (-2)*(3*(-2)-1)/2. a(216) = 1 since 216 = 2^3 + 14^2 + 3*(3*3-1)/2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, On universal sums of polygonal numbers, Sci. China Math. 58(2015), no. 7, 1367-1396.
Programs
-
Mathematica
PenQ[n_]:=n>0&&IntegerQ[Sqrt[24n+1]] Do[r=0;Do[If[PenQ[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}]
Comments