A045634 Number of ways in which n can be partitioned as a sum of a square and cube.
1, 2, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 2, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2
Offset: 0
Keywords
Examples
a(9)=2 because 9=2^3+1^2 and 9=3^2+0^3.
Links
- T. D. Noe, Table of n, a(n) for n = 0..10000
Programs
-
Maple
M:=100; M2:=M^2; t0:=array(0..M2); for i from 0 to M2 do t0[i]:=0; od: for a from 0 to M do for b from 0 to M do i:=a^2+b^3; if i <= M2 then t0[i]:=t0[i]+1; fi; od: od: [seq(t0[i],i=0..M2)];
-
Mathematica
max = 100; Clear[a]; a[_] = 0; Do[n = i^2 + j^3; a[n] += 1, {i, 0, Sqrt[max]}, {j, 0, max^(1/3)}]; Table[a[n], {n, 0, max}] (* Jean-François Alcover, Aug 02 2018 *)
Extensions
More terms from Erich Friedman
Comments