A003331 Numbers that are the sum of 8 positive cubes.
8, 15, 22, 29, 34, 36, 41, 43, 48, 50, 55, 57, 60, 62, 64, 67, 69, 71, 74, 76, 78, 81, 83, 85, 86, 88, 92, 93, 95, 97, 99, 100, 102, 104, 106, 107, 111, 112, 113, 114, 118, 119, 120, 121, 123, 125, 126, 130, 132, 133, 134, 137, 138, 139, 140, 141, 144, 145, 146, 148, 149
Offset: 1
Examples
From _David A. Corneth_, Aug 01 2020: (Start) 1796 is in the sequence as 1796 = 4^3 + 4^3 + 4^3 + 4^3 + 5^3 + 7^3 + 7^3 + 9^3. 2246 is in the sequence as 2246 = 2^3 + 4^3 + 5^3 + 5^3 + 5^3 + 5^3 + 7^3 + 11^3. 3164 is in the sequence as 3164 = 5^3 + 5^3 + 6^3 + 6^3 + 8^3 + 8^3 + 9^3 + 9^3.(End)
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
- OEIS Wiki, Index to sequences related to sums of like powers.
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Other sequences of numbers that are the sum of x nonzero y-th powers:
Programs
-
Mathematica
Module[{upto=200,c},c=Floor[Surd[upto,3]];Select[Union[Total/@ Tuples[ Range[ c]^3,8]],#<=upto&]] (* Harvey P. Dale, Jan 11 2016 *)
-
PARI
(A003331_upto(N, k=8, m=3)=[i|i<-[1..#N=sum(n=1, sqrtnint(N, m), 'x^n^m, O('x^N))^k], polcoef(N, i)])(150) \\ M. F. Hasler, Aug 02 2020 A003331(n)=if(n>478, n+142, n>329, n+141, A003331_upto(470)[n]) \\ M. F. Hasler, Aug 13 2020
-
Python
from itertools import combinations_with_replacement as mc def aupto(lim): cbs = (i**3 for i in range(1, int((lim-7)**(1/3))+2)) return sorted(set(k for k in (sum(c) for c in mc(cbs, 8)) if k <= lim)) print(aupto(150)) # Michael S. Branicky, Aug 15 2021
Formula
a(n) = 142 + n for all n > 478. - M. F. Hasler, Aug 13 2020
Comments