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.

A025416 Least sum of 4 nonzero squares in exactly n ways.

Original entry on oeis.org

0, 4, 31, 28, 52, 82, 90, 135, 130, 162, 198, 202, 252, 234, 210, 346, 306, 322, 423, 370, 330, 418, 390, 462, 378, 490, 598, 450, 546, 618, 522, 594, 642, 682, 570, 770, 714, 690, 762, 906, 738, 630, 1030, 850, 1035, 978, 858, 954, 810, 1197, 1146, 882, 1090, 1206
Offset: 0

Views

Author

Keywords

Comments

Conjecture: The sequence never becomes monotonic increasing. - Jon Perry, Nov 03 2012

Examples

			a(2) = 31 because 31 = 1 + 1 + 4 + 25 = 4 + 9 + 9 + 9 and no others.
a(3) = 28 because 28 = 1 + 1 + 1 + 25 = 1 + 9 + 9 + 9 = 4 + 4 + 4 + 16 and no others.
a(4) = 52 because 52 = 1 + 1 + 1 + 49 = 1 + 1 + 25 + 25 = 4 + 16 + 16 + 16 = 9 + 9 + 9 + 25 and no others.
		

Programs

  • Mathematica
    nn = 40; t = Select[Flatten[Table[a^2 + b^2 + c^2 + d^2, {a, nn}, {b, a}, {c, b}, {d, c}]], # <= nn^2 + 3 &]; {t1, t2} = Transpose[Sort[Tally[t]]]; u = Union[t2]; c = Complement[Range[u[[-1]]], u]; If[c == {}, last = u[[-1]], last = c[[1]] - 1]; Join[{0}, Table[t1[[Position[t2, n, 1, 1][[1, 1]]]], {n, last}]] (* T. D. Noe, Nov 02 2012 *)

Formula

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

Extensions

0th term added by Jon Perry, Nov 02 2012