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.

A025367 Numbers that are the sum of 4 nonzero squares in 2 or more ways.

This page as a plain text file.
%I A025367 #21 Aug 05 2021 07:27:07
%S A025367 28,31,34,36,37,39,42,43,45,47,49,50,52,54,55,57,58,60,61,63,66,67,68,
%T A025367 69,70,71,73,74,75,76,77,78,79,81,82,83,84,85,86,87,90,91,92,93,94,95,
%U A025367 97,98,99,100,102,103,105,106,107,108,109,110,111,112,113,114,115,116,117,118
%N A025367 Numbers that are the sum of 4 nonzero squares in 2 or more ways.
%H A025367 Robert Israel, <a href="/A025367/b025367.txt">Table of n, a(n) for n = 1..10000</a>
%H A025367 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A025367 {n: A025428(n) >= 2}. - _R. J. Mathar_, Jun 15 2018
%p A025367 N:= 1000: # to get all terms <= N
%p A025367 V:= Vector(N):
%p A025367 for x from 1 while x^2 +3 <= N do
%p A025367 for y from 1 to x while x^2 + y^2 + 2 <= N do
%p A025367   for z from 1 to y while x^2 + y^2 + z^2 + 1 <= N do
%p A025367     for w from 1 to z while x^2 + y^2 + z^2 + w^2 <= N do
%p A025367        t:= x^2 + y^2 + z^2 + w^2;
%p A025367        V[t]:= V[t]+1;
%p A025367 od od od od:
%p A025367 select(t -> V[t] >= 2, [$1..N]); # _Robert Israel_, Jul 05 2017
%t A025367 Select[Range@ 200, 2 == Length@ Quiet@ IntegerPartitions[#, {4}, Range[Sqrt@ #]^2, 2] &] (* _Giovanni Resta_, Jul 05 2017 *)
%t A025367 M = 1000;
%t A025367 Clear[V]; V[_] = 0;
%t A025367 For[a = 1, a <= Floor[Sqrt[M/4]], a++,
%t A025367   For[b = a, b <= Floor[Sqrt[(M - a^2)/3]], b++,
%t A025367     For[c = b, c <= Floor[Sqrt[(M - a^2 - b^2)/2]], c++,
%t A025367       For[d = c, d <= Floor[Sqrt[M - a^2 - b^2 - c^2]], d++,
%t A025367         m = a^2 + b^2 + c^2 + d^2;
%t A025367         V[m] = V[m] + 1;
%t A025367 ]]]];
%t A025367 Select[Range[M], V[#] >= 2&] (* _Jean-François Alcover_, Mar 22 2019, after _Robert Israel_ *)
%Y A025367 Cf. A000414, A024796, A025358, A025368, A025406, A344795.
%K A025367 nonn
%O A025367 1,1
%A A025367 _David W. Wilson_