cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A047715 Numbers that are the sum of 4 but no fewer nonzero fourth powers.

This page as a plain text file.
%I A047715 #15 May 16 2021 22:17:34
%S A047715 4,19,34,49,64,84,99,114,129,164,179,194,244,259,274,289,304,324,339,
%T A047715 354,369,419,434,499,514,529,544,594,609,628,643,658,673,674,708,723,
%U A047715 738,769,784,788,803,849,868,883,898,913,963,978,1024,1043,1138,1153
%N A047715 Numbers that are the sum of 4 but no fewer nonzero fourth powers.
%C A047715 First differs from A003338 at term 64: A003338(64) = 1393 is also a term of A003337, so not a term here. - _Michael S. Branicky_, Apr 19 2021
%F A047715 Equals A003338 - A344188 - A344187 - A000583, where "-" denotes "set difference". - _Sean A. Irvine_, May 15 2021
%o A047715 (Python)
%o A047715 limit = 1153
%o A047715 from functools import lru_cache
%o A047715 qd = [k**4 for k in range(1, int(limit**.25)+2) if k**4 + 3 <= limit]
%o A047715 qds = set(qd)
%o A047715 @lru_cache(maxsize=None)
%o A047715 def findsums(n, m):
%o A047715   if m == 1: return {(n,)} if n in qds else set()
%o A047715   return set(tuple(sorted(t+(q,))) for q in qds for t in findsums(n-q, m-1))
%o A047715 A003338s = set(n for n in range(4, limit+1) if len(findsums(n, 4)) >= 1)
%o A047715 A003337s = set(n for n in range(3, limit+1) if len(findsums(n, 3)) >= 1)
%o A047715 A003336s = set(n for n in range(2, limit+1) if len(findsums(n, 2)) >= 1)
%o A047715 print(sorted(A003338s - A003337s - A003336s - qds)) # _Michael S. Branicky_, Apr 19 2021
%Y A047715 Cf. A000583, A002377, A003338 (sum of 4), A003337 (sum of 3), A003336 (sum of 2), A344188, A344187.
%K A047715 nonn
%O A047715 1,1
%A A047715 Arlin Anderson (starship1(AT)gmail.com)