A306239 Number of ways to write n as x^3 + y^3 + pen(z) + pen(w), where x, y, z, w are nonnegative integers with x <= y and z <= w, and pen(k) denotes the pentagonal number k*(3*k-1)/2.
1, 2, 3, 2, 1, 1, 2, 2, 2, 2, 3, 2, 2, 3, 4, 2, 1, 2, 3, 2, 1, 3, 3, 2, 3, 3, 3, 2, 4, 4, 2, 2, 3, 4, 2, 4, 5, 4, 3, 2, 5, 3, 2, 3, 4, 4, 1, 2, 3, 3, 3, 4, 6, 3, 3, 3, 4, 3, 3, 4, 4, 2, 3, 4, 5, 5, 4, 4, 2, 2, 5, 8, 7, 4, 4, 5, 3, 5, 6, 7, 2, 3, 5, 3, 5, 2, 5, 5, 4, 4, 3, 6, 5, 4, 6, 3, 2, 4, 8, 5, 5
Offset: 0
Keywords
Examples
a(4) = 1 with 4 = 1^3 + 1^3 + pen(1) + pen(1). a(5) = 1 with 5 = 0^3 + 0^3 + pen(0) + pen(2). a(16) = 1 with 16 = 2^3 + 2^3 + pen(0) + pen(0). a(20) = 1 with 20 = 0^3 + 2^3 + pen(0) + pen(3). a(46) = 1 with 46 = 1^3 + 1^3 + pen(4) + pen(4).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
PenQ[n_]:=PenQ[n]=IntegerQ[Sqrt[24n+1]]&&(n==0||Mod[Sqrt[24n+1]+1,6]==0); tab={};Do[r=0;Do[If[PenQ[n-x^3-y^3-z(3z-1)/2],r=r+1],{x,0,(n/2)^(1/3)},{y,x,(n-x^3)^(1/3)},{z,0,(Sqrt[12(n-x^3-y^3)+1]+1)/6}];tab=Append[tab,r],{n,0,100}];Print[tab]
Comments