login
Triangle read by rows: row n gives coefficients of (1+x+x^2)^n mod n.
1

%I #6 Apr 10 2013 12:31:37

%S 0,0,0,0,1,0,1,0,1,1,0,0,1,0,0,1,1,0,2,0,3,0,2,0,1,1,0,0,0,0,1,0,0,0,

%T 0,1,1,0,3,2,0,0,3,0,0,2,3,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,4,0,

%U 2,0,0,0,3,0,0,0,2,0,4,0,1,1,0,0,3,0,0,6,0,0,7,0,0,6,0,0,3,0,0,1

%N Triangle read by rows: row n gives coefficients of (1+x+x^2)^n mod n.

%e Triangle begins:

%e [0]

%e [0, 0, 0]

%e [1, 0, 1, 0, 1]

%e [1, 0, 0, 1, 0, 0, 1]

%e [1, 0, 2, 0, 3, 0, 2, 0, 1]

%e [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]

%e [1, 0, 3, 2, 0, 0, 3, 0, 0, 2, 3, 0, 1]

%p f := n -> seriestolist( series( expand( (1+x+x^2)^n ) mod n, x, 2*n+1));

%Y Cf. A053200.

%K nonn,tabf

%O 0,19

%A _N. J. A. Sloane_, Feb 20 2004