Can anybody suggest a fast algorithm for generating this Triangle where the $k$-th item at $n$-th row (both starting from 1) tells in how many ways we can add $2$ distinct integers from $1$ to $n$, in such way that the sum is divisible by $k$.
Sequence generation
0
$\begingroup$
sequences-and-series
-
0http://oeis.org/A061857 – 2012-05-07
-
0There's a Maple algorithm given there, no? – 2012-05-07
-
1Not a complete one though... trinv is not defined. And not fast because it's $O(n^2)$ to get one entry of the triangle. – 2012-05-07