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.

A025358 Numbers that are the sum of 4 nonzero squares in exactly 2 ways.

Original entry on oeis.org

31, 34, 36, 37, 39, 43, 45, 47, 49, 50, 54, 57, 61, 68, 69, 71, 74, 77, 81, 83, 86, 94, 107, 113, 116, 131, 136, 144, 149, 200, 216, 272, 296, 344, 376, 464, 544, 576, 800, 864, 1088, 1184, 1376, 1504, 1856, 2176, 2304, 3200, 3456, 4352, 4736, 5504, 6016, 7424
Offset: 1

Views

Author

Keywords

Comments

Conjecture: the even members of this sequence are all numbers of the form
k*4^m for k in [9,17,29], m>= 1, or k*4^m for k in [34, 50, 54, 74, 86, 94], m>=0. - Robert Israel, Nov 03 2017

Crossrefs

Cf. A025367 (at least 2 ways).

Programs

  • Maple
    N:= 10000: # to get all terms <= N
    T:= Vector(N):
    for a from 1 to floor(sqrt(N/4)) do
        for b from a to floor(sqrt((N-a^2)/3)) do
          for c from b to floor(sqrt((N-a^2-b^2)/2)) do
            for d from c to floor(sqrt(N-a^2-b^2-c^2)) do
              m:= a^2+b^2+c^2+d^2;
              T[m]:= T[m]+1;
    od od od od:
    select(i -> T[i] = 2, [$1..N]); # Robert Israel, Nov 03 2017
  • Mathematica
    M = 1000;
    Clear[T]; T[_] = 0;
    For[a = 1, a <= Floor[Sqrt[M/4]], a++,
      For[b = a, b <= Floor[Sqrt[(M - a^2)/3]], b++,
        For[c = b, c <= Floor[Sqrt[(M - a^2 - b^2)/2]], c++,
          For[d = c, d <= Floor[Sqrt[M - a^2 - b^2 - c^2]], d++,
            m = a^2 + b^2 + c^2 + d^2;
            T[m] = T[m] + 1;
    ]]]];
    Select[Range[M], T[#] == 2&] (* Jean-François Alcover, Mar 22 2019, after Robert Israel *)

Formula

{n: A025428(n) = 2}. - R. J. Mathar, Jun 15 2018