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.

This page as a plain text file.
%I A025362 #24 Apr 20 2021 16:49:59
%S A025362 90,124,133,147,156,157,159,163,165,166,171,174,177,188,193,201,203,
%T A025362 205,219,239,241,249,254,260,284,293,299,329,341,360,496,624,664,696,
%U A025362 752,1016,1040,1136,1440,1984,2496,2656,2784,3008,4064,4160,4544,5760,7936
%N A025362 Numbers that are the sum of 4 nonzero squares in exactly 6 ways.
%H A025362 Michael S. Branicky, <a href="/A025362/b025362.txt">Table of n, a(n) for n = 1..100</a> (terms 67..73 from Chai Wah Wu and terms n = 1..66 from Robert Price)
%H A025362 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%o A025362 (Python)
%o A025362 limit = 8000
%o A025362 from functools import lru_cache
%o A025362 sq = [k**2 for k in range(1, int(limit**.5)+2) if k**2 + 3 <= limit]
%o A025362 sqs = set(sq)
%o A025362 @lru_cache(maxsize=None)
%o A025362 def findsums(n, m):
%o A025362   if m == 1: return {(n, )} if n in sqs else set()
%o A025362   return set(tuple(sorted(t+(s,))) for s in sqs for t in findsums(n-s, m-1))
%o A025362 print([n for n in range(4, limit+1) if len(findsums(n, 4)) == 6]) # _Michael S. Branicky_, Apr 20 2021
%Y A025362 Cf. A025428, A025371 (at least 6 ways).
%K A025362 nonn
%O A025362 1,1
%A A025362 _David W. Wilson_