A047718 Numbers that are the sum of 7 but no fewer nonzero fourth powers.
7, 22, 37, 52, 67, 87, 102, 112, 117, 132, 147, 167, 177, 182, 197, 212, 227, 242, 247, 262, 277, 292, 307, 322, 327, 342, 352, 357, 372, 387, 402, 407, 417, 422, 437, 452, 467, 482, 487, 502, 517, 532, 547, 562, 567, 577, 582, 592, 597, 612, 631, 646, 662
Offset: 1
Keywords
Links
- David A. Corneth, Table of n, a(n) for n = 1..26439 (terms <= 200000)
Programs
-
PARI
upto(n)={my(e=7); my(s=sum(k=1, sqrtint(sqrtint(n)), x^(k^4)) + O(x*x^n)); my(p=s^e, q=(1 + s)^(e-1)); select(k->polcoeff(p,k) && !polcoeff(q,k), [1..n])} \\ Andrew Howroyd, Jul 06 2018
-
Python
from itertools import combinations_with_replacement as mc def aupto(limit): qd = [k**4 for k in range(1, int(limit**.25)+2) if k**4 + 6 <= limit] ss = [set(sum(c) for c in mc(qd, i)) for i in range(8)] s7nf = ss[7] - ss[6] - ss[5] - ss[4] - ss[3] - ss[2] - ss[1] return sorted(s for s in s7nf if s <= limit) print(aupto(663)) # Michael S. Branicky, Jul 22 2021