%I
%S 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,0,1,2,3,0,1,2,3,
%T 4,0,1,2,3,4,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,
%U 5,6,0,1,2,3,4,5,6,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1,2,3,4
%N Integers 0..k three times, then 0..k+1 three times, etc.
%H G. C. Greubel, <a href="/A073189/b073189.txt">Rows n=0..50 of triangle, flattened</a>
%H M. Somos, <a href="/A073189/a073189.txt">Sequences used for indexing triangular or square arrays</a>
%e 0;
%e 0;
%e 0;
%e 0, 1;
%e 0, 1;
%e 0, 1;
%e 0, 1, 2;
%e 0, 1, 2;
%e 0, 1, 2;
%e 0, 1, 2, 3;
%e 0, 1, 2, 3; ...
%t Table[Range[0, k], {k, 0, 7}, {3}] // Flatten (* _JeanFrançois Alcover_, Apr 18 2013 *)
%o (PARI) a(n)=local(m); m=floor(sqrt(6*n+6)3/2)\3+1; (n3*binomial(m,2))%m
%K nonn,tabf
%O 0,12
%A _Michael Somos_, Jul 19 2002
