0
$\begingroup$

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$.

  • 0
    http://oeis.org/A0618572012-05-07
  • 0
    There's a Maple algorithm given there, no?2012-05-07
  • 1
    Not 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

1 Answers 1