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.

A224981 Numbers that are the sum of exactly 6 distinct nonzero squares.

Original entry on oeis.org

91, 104, 115, 119, 124, 130, 131, 136, 139, 143, 146, 147, 151, 152, 154, 155, 156, 159, 160, 163, 164, 166, 167, 168, 169, 170, 171, 175, 176, 178, 179, 180, 181, 182, 184, 187, 188, 190, 191, 192, 194, 195, 196, 199, 200, 201, 202, 203, 204, 206, 207, 208
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 22 2013

Keywords

Examples

			a(1) = 1 + 4 + 9 + 16 + 25 + 36 = 91 = A000330(6);
a(2) = 1 + 4 + 9 + 16 + 25 + 49 = 104;
a(3) = 1 + 4 + 9 + 16 + 36 + 49 = 115;
a(4) = 1 + 4 + 9 + 16 + 25 + 64 = 119;
a(5) = 1 + 4 + 9 + 25 + 36 + 49 = 124.
		

Crossrefs

Programs

  • Haskell
    a224981 n = a224981_list !! (n-1)
    a224981_list = filter (p 6 $ tail a000290_list) [1..] where
       p k (q:qs) m = k == 0 && m == 0 ||
                      q <= m && k >= 0 && (p (k - 1) qs (m - q) || p k qs m)
  • Mathematica
    nmax = 1000;
    S[n_] := S[n] = Union[Total /@ Subsets[
         Range[Floor[Sqrt[n]]]^2, {6}]][[1 ;; nmax]];
    S[nmax];
    S[n = nmax + 1];
    While[S[n] != S[n - 1], n++];
    S[n] (* Jean-François Alcover, Nov 20 2021 *)