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.

A188898 The index of the least n-gonal number greater than 1 that is also square, or 0 if none exists.

Original entry on oeis.org

8, 2, 81, 25, 6, 9, 2, 0, 7, 4, 3, 9, 22, 2, 49, 4, 8, 0, 17, 9, 81, 5, 2, 25, 46, 3, 10, 121, 6, 9, 18, 4, 31, 2, 11, 169, 7, 6, 1681, 49, 8, 4, 4961, 12, 225, 8, 2, 16, 32, 0, 49, 25, 17, 13, 289, 9, 49, 7, 27, 81, 118, 2, 136161, 196, 14, 4, 10, 841, 1521
Offset: 3

Views

Author

T. D. Noe, Apr 13 2011

Keywords

Comments

Sequence A188896 gives the n that have no solution.

Crossrefs

Cf. A100252 (least square n-gonal number greater than 1).

Programs

  • Mathematica
    kMax = 25000; NgonIndex[n_, v_] := (-4 + n + Sqrt[16 - 8*n + n^2 - 16*v + 8*n*v])/(n - 2)/2; Table[k = 2; While[sqr = k^2; i = NgonIndex[n, sqr]; k < kMax && ! IntegerQ[i], k++]; If[k == kMax, k = sqr = i = 0]; i, {n, 3, 64}]

Formula

If n is a square, then a(n)=2.