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.

A065458 Number of inequivalent (ordered) solutions to a^2 + b^2 + c^2 + d^2 = n^2.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 4, 4, 2, 6, 7, 6, 4, 8, 10, 14, 2, 11, 14, 13, 7, 23, 15, 17, 4, 24, 21, 31, 10, 25, 37, 28, 2, 46, 29, 49, 14, 38, 35, 61, 7, 45, 62, 49, 15, 93, 47, 57, 4, 72, 67, 97, 21, 71, 84, 101, 10, 119, 70, 86, 37, 92, 79, 165, 2, 138, 127, 109, 29, 168, 140, 121, 14
Offset: 0

Views

Author

Wouter Meeussen, Nov 18 2001

Keywords

Examples

			a(5)=3 because 25 produces {0,0,0,5}, {0,0,3,4}, {1,2,2,4}.
		

Crossrefs

Column k=4 of A255212.

Programs

  • Maple
    N:= 100:
    R:= Vector(N,1):
    for a from 0 to N do
      for b from a to floor(sqrt(N^2-a^2)) do
         for c from b to floor(sqrt(N^2-a^2-b^2)) do
           q:= a^2 + b^2 + c^2;
           for f in numtheory:-divisors(q) do
              if f^2 + 2*f*c <= q and (f + q/f)::even then
                 r:= (f + q/f)/2;
                 if r <= N then R[r]:= R[r]+1 fi;
              fi
    od od od od:
    convert(R,list); # Robert Israel, Feb 16 2015
  • Mathematica
    Length/@Table[SumOfSquaresRepresentations[4, (k)^2], {k, 72}]

Extensions

a(0)=1 prepended by Alois P. Heinz, Feb 17 2015