OFFSET
3,1
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, k=0]; k, {n, 3, 50}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 13 2011
STATUS
approved