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.

A214513 Least number having n orderless representations as p^2 + q^2 + r^2 + s^2, where p, q, r, and s are primes.

Original entry on oeis.org

16, 148, 196, 436, 388, 628, 868, 988, 1228, 1468, 1708, 2212, 2068, 2860, 2620, 2380, 3220, 3388, 3700, 4108, 3940, 4180, 5260, 4228, 5068, 4900, 5500, 6220, 6340, 7780, 5908, 5740, 6580, 7540, 8260, 7420, 8860, 9340, 11260, 10708, 9940, 9100, 10180, 12820
Offset: 1

Views

Author

T. D. Noe, Jul 29 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 10^5; ps = Prime[Range[PrimePi[Sqrt[nn]]]]; t = Flatten[Table[ps[[i]]^2 + ps[[j]]^2 + ps[[k]]^2 + ps[[l]]^2, {i, Length[ps]}, {j, i, Length[ps]}, {k, j, Length[ps]}, {l, k, Length[ps]}]]; t = Select[t, # <= nn &]; t2 = Sort[Tally[t]]; u = Union[Transpose[t2][[2]]]; d = Complement[Range[u[[-1]]], u]; If[d == {}, nLim = u[[-1]], nLim = d[[1]]-1]; t3 = Table[Select[t2, #[[2]] == n &, 1][[1]], {n, nLim}]; Transpose[t3][[1]]