login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025362 Numbers that are the sum of 4 nonzero squares in exactly 6 ways. 4

%I #24 Apr 20 2021 16:49:59

%S 90,124,133,147,156,157,159,163,165,166,171,174,177,188,193,201,203,

%T 205,219,239,241,249,254,260,284,293,299,329,341,360,496,624,664,696,

%U 752,1016,1040,1136,1440,1984,2496,2656,2784,3008,4064,4160,4544,5760,7936

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

%H 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 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%o (Python)

%o limit = 8000

%o from functools import lru_cache

%o sq = [k**2 for k in range(1, int(limit**.5)+2) if k**2 + 3 <= limit]

%o sqs = set(sq)

%o @lru_cache(maxsize=None)

%o def findsums(n, m):

%o if m == 1: return {(n, )} if n in sqs else set()

%o return set(tuple(sorted(t+(s,))) for s in sqs for t in findsums(n-s, m-1))

%o print([n for n in range(4, limit+1) if len(findsums(n, 4)) == 6]) # _Michael S. Branicky_, Apr 20 2021

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

%K nonn

%O 1,1

%A _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:49 EDT 2024. Contains 371914 sequences. (Running on oeis4.)