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.

A025362 Numbers that are the sum of 4 nonzero squares in exactly 6 ways.

Original entry on oeis.org

90, 124, 133, 147, 156, 157, 159, 163, 165, 166, 171, 174, 177, 188, 193, 201, 203, 205, 219, 239, 241, 249, 254, 260, 284, 293, 299, 329, 341, 360, 496, 624, 664, 696, 752, 1016, 1040, 1136, 1440, 1984, 2496, 2656, 2784, 3008, 4064, 4160, 4544, 5760, 7936
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A025428, A025371 (at least 6 ways).

Programs

  • Python
    limit = 8000
    from functools import lru_cache
    sq = [k**2 for k in range(1, int(limit**.5)+2) if k**2 + 3 <= limit]
    sqs = set(sq)
    @lru_cache(maxsize=None)
    def findsums(n, m):
      if m == 1: return {(n, )} if n in sqs else set()
      return set(tuple(sorted(t+(s,))) for s in sqs for t in findsums(n-s, m-1))
    print([n for n in range(4, limit+1) if len(findsums(n, 4)) == 6]) # Michael S. Branicky, Apr 20 2021