OFFSET
3,1
COMMENTS
a(n)=2 iff A176774(n)=n.
LINKS
Michel Marcus, Table of n, a(n) for n = 3..10000
Eric Weisstein's World of Mathematics, Polygonal Number.
FORMULA
a(n) = (m-4+sqrt((m-4)^2+8*(m-2)*n)) / (2*m-4), where m = A176774(n).
PROG
(PARI) f(n) = {k=3; while (! ispolygonal(n, k), k++); k; } \\ A176774
a(n) = my(m=f(n)); (m-4+sqrtint((m-4)^2+8*(m-2)*n)) / (2*m-4); \\ Michel Marcus, May 09 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Apr 25 2010
STATUS
approved