A255018 Smallest number that is the sum of 3 nonnegative cubes in exactly n ways.
4, 0, 216, 5104, 13896, 161568, 1259712, 2016496, 2562624, 14926248, 58995000, 34012224, 150547032, 471960000, 119095488, 1259712000, 952763904, 5159780352, 3974344704, 2176782336, 10077696000, 2985984000, 36330467328, 30723115968, 23887872000, 17414258688, 72825163776, 75686967000
Offset: 0
Keywords
Examples
a(0) = 4 because the smallest number that cannot be represented as a sum of 3 nonnegative cubes is 4. a(1) = 0 is the sum of three 0's. a(2) = 216 = 3^3 + 4^3 + 5^3 = 6^3 + 0 + 0. a(3) = 5104 = 1 + 12^3 + 15^3 = 2^3 + 10^3 + 16^3 = 9^3 + 10^3 + 15^3.
Programs
-
Python
TOP = 6000000 a = [0]*TOP for b in range(TOP): b3 = b**3 if b3*3>=TOP: break for c in range(b,TOP): c3 = b3 + c**3 if c3>=TOP: break for d in range(c,TOP): res = c3 + d**3 if res>=TOP: break a[res] += 1 m = max(a) r = [-1] * (m+1) for i in range(TOP): if r[a[i]]==-1: r[a[i]]=i print(r)
Extensions
More terms from Rémy Sigrist, Jul 14 2020