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.

A025371 Numbers that are the sum of 4 nonzero squares in 6 or more ways.

Original entry on oeis.org

90, 124, 130, 133, 135, 138, 147, 148, 150, 154, 156, 157, 159, 162, 163, 165, 166, 170, 171, 172, 174, 175, 177, 178, 180, 182, 183, 186, 187, 188, 189, 190, 193, 195, 196, 198, 199, 201, 202, 203, 205, 207, 210, 213, 214, 215, 217, 218, 219, 220, 222, 223, 225, 226
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    limit = 226
    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

Formula

{n: A025428(n) >= 6}. Union of A025372 and A025362. - R. J. Mathar, Jun 15 2018