|
|
A003329
|
|
Numbers that are the sum of 6 positive cubes.
|
|
45
|
|
|
6, 13, 20, 27, 32, 34, 39, 41, 46, 48, 53, 58, 60, 65, 67, 69, 72, 76, 79, 83, 84, 86, 90, 91, 95, 97, 98, 102, 104, 105, 109, 110, 116, 117, 121, 123, 124, 128, 130, 132, 135, 136, 137, 139, 142, 143, 144, 146, 147, 151, 153, 154, 156, 158, 160, 161, 162, 163, 165, 170
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
As the order of addition doesn't matter we can assume terms are in increasing order. - David A. Corneth, Aug 01 2020
|
|
LINKS
|
|
|
EXAMPLE
|
1647 is in the sequence as 1647 = 3^3 + 3^3 + 5^3 + 5^3 + 7^3 + 10^3.
3319 is in the sequence as 3319 = 5^3 + 5^3 + 5^3 + 6^3 + 10^3 + 12^3.
4038 is in the sequence as 4038 = 3^3 + 3^3 + 6^3 + 8^3 + 8^3 + 14^3. (End)
|
|
MATHEMATICA
|
max = 200; cmax = Ceiling[(max - 5)^(1/3)]; cc = Array[c, 6]; iter = Sequence @@ Transpose[ {cc, Join[{1}, Most[cc]], Table[cmax, {6}]}]; Union[ Reap[ Do[ a = Total[cc^3]; If[a <= max, Sow[a]], Evaluate[iter]]][[2, 1]]] (* Jean-François Alcover, Oct 23 2012 *)
|
|
PROG
|
(PARI) (A003329_upto(N, k=6, m=3)=[i|i<-[1..#N=sum(n=1, sqrtnint(N, m), 'x^n^m, O('x^N))^k], polcoef(N, i)])(200) \\ M. F. Hasler, Aug 02 2020
(Python)
from collections import Counter
from itertools import combinations_with_replacement as multi_combs
def aupto(lim):
c = filter(lambda x: x<=lim, (i**3 for i in range(1, int(lim**(1/3))+2)))
s = filter(lambda x: x<=lim, (sum(mc) for mc in multi_combs(c, 6)))
counts = Counter(s)
return sorted(k for k in counts)
|
|
CROSSREFS
|
Cf. A###### (x, y) = Numbers that are the sum of x nonzero y-th powers:
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|