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.

A207640 Squares that can be written as a sum of 3 distinct nonzero squares in exactly two ways.

Original entry on oeis.org

225, 361, 625, 900, 1444, 2500, 3600, 5776, 10000, 14400, 23104, 40000, 57600, 92416, 160000, 230400, 369664, 640000, 921600, 1478656, 2560000, 3686400
Offset: 1

Views

Author

Keywords

Comments

k is a term if and only if 4*k is a term. Are 225, 361 and 625 the only terms not divisible by 4? - Robert Israel, Jan 28 2025

Crossrefs

Programs

  • Maple
    N:= 1000; # for squares up to N^2
    V:= Vector(N):
    for x from 1 to N-1 do
      for y from 1 to x-1 while x^2 + y^2 < N^2 do
        for z from 1 to y-1 do
          s:= x^2 + y^2 + z^2;
          if s > N^2 then break fi;
          if issqr(s) then
            v:= sqrt(s);
            V[v]:= V[v]+1
          fi
    od od od:
    map(`^`, select(t -> V[t]=2, [$1..N]),2); # Robert Israel, Jan 28 2025
  • Mathematica
    t = Sort[Select[Flatten[Table[x^2 + y^2 + z^2, {x, 400}, {y, x + 1, 400}, {z, y + 1, 400}]], # < 160006 && IntegerQ[Sqrt[#]] &]];
    f1[l_] := Module[{t = {}}, Do[If[l[[n]] != l[[n + 1]] && l[[n]] != l[[n - 1]], AppendTo[t, l[[n]]]], {n, Length[l] - 1}]; t];
    f2[l_] := Module[{t = {}}, Do[If[l[[n]] == l[[n + 1]], AppendTo[t, l[[n]]]], {n, Length[l] - 1}]; t];
    s1 = Join[{First[t]}, f1[t]];
    Complement[t, s1];
    t = f2[t];
    s2 = Join[{First[t]}, f1[t]]

Extensions

a(15)-a(22) from Robert Israel, Jan 28 2025