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.

A049260 Smallest nonnegative value taken on by n*x^2 - y^2 for an infinite number of integer pairs (x, y).

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 1, 5, 6, 0, 1, 2, 2, 4, 3, 2, 7, 8, 0, 1, 2, 3, 1, 5, 3, 7, 8, 9, 10, 0, 1, 2, 3, 4, 1, 6, 2, 7, 5, 5, 11, 12, 0, 1, 2, 3, 1, 2, 6, 7, 3, 1, 2, 11, 1, 13, 14, 0, 1, 2, 2, 4, 5, 5, 7, 8, 1, 1, 11, 3, 7, 14, 15, 16, 0, 1, 2, 3, 1, 2, 6, 7, 1, 9, 3, 7, 3, 5, 14, 15, 1
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    f[n_, z_] := FindInstance[x > 0 && y > 0 && n*x^2 - y^2 == z, {x, y}, Integers, 1]; a[n_] := For[z = 0, True, z++, fz = f[n, z]; If[fz =!= {}, Print["a(", n, ") = ", z, " {x, y} = ", {x, y} /. fz[[1]]]; Return[z]]]; Array[a, 97] (* Jean-François Alcover, Oct 11 2016 *)