%I A061857
%S A061857 0,1,0,3,1,1,6,2,2,1,10,4,4,2,2,15,6,5,3,3,2,21,9,7,5,4,3,3,28,12,10,6,
%T A061857 6,4,4,3,36,16,12,8,8,5,5,4,4,45,20,15,10,9,7,6,5,5,4,55,25,19,13,11,9,
%U A061857 8,6,6,5,5,66,30,22,15,13,10,10,7,7,6,6,5,78,36,26,18,16,12,12,9,8,7,7
%N A061857 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.
%H A061857 <a href="Sindx_Su.html#subsetsums">Index entries for sequences related
to subset sums modulo m</a>
%e A061857 E.g. the second term on the sixth row is 6 because we have 6 solutions:
{1+3, 1+5, 2+4, 2+6, 3+5, 4+6} and the third term on the same row
is 5 because we have solutions {1+2,1+5,2+4,3+6,4+5}
%p A061857 [seq(DivSumChoose2Triangle(j),j=1..120)]; DivSumChoose2Triangle := (n)
-> nops(DivSumChoose2(trinv(n-1),(n-((trinv(n-1)*(trinv(n-1)-1))/
2))));
%p A061857 DivSumChoose2 := proc(n,k) local a,i,j; a := []; for i from 1 to (n-1)
do for j from (i+1) to n do if(0 = ((i+j) mod k)) then a := [op(a),
[i,j]]; fi; od; od; RETURN(a); end;
%Y A061857 The left edge (first diagonal) of the triangle: A000217, the second diagonal
is given by C(((n+(n mod 2))/2), 2)+C(((n-(n mod 2))/2), 2) = A002620,
the third diagonal by A058212, the fourth by A001971, the central
column by A042963? trinv is given at A054425. Cf. A061865.
%Y A061857 Sequence in context: A162315 A109446 A088441 this_sequence A067433 A133567
A125230
%Y A061857 Adjacent sequences: A061854 A061855 A061856 this_sequence A061858 A061859
A061860
%K A061857 nonn,tabl
%O A061857 0,4
%A A061857 Antti Karttunen May 11 2001
|