OFFSET
0,12
LINKS
G. C. Greubel, Rows n=0..50 of triangle, flattened
Michael Somos, Sequences used for indexing triangular or square arrays
EXAMPLE
0;
0;
0;
0, 1;
0, 1;
0, 1;
0, 1, 2;
0, 1, 2;
0, 1, 2;
0, 1, 2, 3;
0, 1, 2, 3; ...
MATHEMATICA
Table[Range[0, k], {k, 0, 7}, {3}] // Flatten (* Jean-François Alcover, Apr 18 2013 *)
PROG
(PARI) a(n)=local(m); m=floor(sqrt(6*n+6)-3/2)\3+1; (n-3*binomial(m, 2))%m
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Michael Somos, Jul 19 2002
STATUS
approved