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.

A025340 Numbers that are the sum of 3 distinct nonzero squares in exactly 2 ways.

This page as a plain text file.
%I A025340 #19 Aug 22 2021 17:23:49
%S A025340 62,69,74,77,86,89,90,94,98,105,117,122,125,129,131,138,141,150,154,
%T A025340 155,158,165,166,170,179,181,195,197,201,203,210,213,217,218,225,227,
%U A025340 229,233,238,241,242,246,248,249,250,259,273,274,275,276,282,296,297,301,308,310
%N A025340 Numbers that are the sum of 3 distinct nonzero squares in exactly 2 ways.
%H A025340 Robert Israel, <a href="/A025340/b025340.txt">Table of n, a(n) for n = 1..1777</a>
%H A025340 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%p A025340 N:= 10^6;
%p A025340 A:= Vector(N):
%p A025340 for a from 1 to floor(sqrt(N/3)) do
%p A025340   for b from a+1 to floor(sqrt((N-a^2)/2)) do
%p A025340     c:= [$(b+1) .. floor(sqrt(N-a^2-b^2))]:
%p A025340     v:= map(t -> a^2 + b^2 + t^2, c):
%p A025340     A[v]:= map(`+`,A[v],1)
%p A025340 od od:
%p A025340 select(t -> A[t]=2,[$1..N]); # _Robert Israel_, Jan 03 2016
%t A025340 upperbound = 10^4; max = Floor@Sqrt@upperbound;
%t A025340 range = ConstantArray[0, 3*max^2];
%t A025340 ++range[[#]]&/@(Plus@@#&/@Subsets[Range@max^2,{3}]);
%t A025340 Select[Flatten@Position[range, 2], # <= upperbound &] (* _Hans Rudolf Widmer_, Aug 04 2021 *)
%Y A025340 Subsequence of A004432. Subsequence of A024804.
%K A025340 nonn
%O A025340 1,1
%A A025340 _David W. Wilson_