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.

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

Original entry on oeis.org

2, 6, 12, 2, 5, 3, 10, 2, 0, 5, 3, 15, 2, 3, 6, 0, 11, 6, 2, 35, 3, 4, 6, 12, 3, 2, 10, 7, 8, 63, 4, 5, 285, 2, 20, 0, 6, 15, 3, 8, 9, 99, 2, 6, 18, 5, 15, 30, 6, 3, 21, 19, 2, 9, 10, 3, 6, 7, 5, 621, 14, 21, 42, 2, 55, 28, 4, 725, 3, 10, 11, 195, 7, 8, 460, 2, 14, 6, 28, 56, 10, 4, 36, 2107
Offset: 3

Views

Author

T. D. Noe, Apr 13 2011

Keywords

Crossrefs

Cf. A188891.

Programs

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

Formula

If n is a triangular number, then a(n)=2.