login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of compositions of n such that two adjacent parts are not equal modulo 3.
1

%I #4 May 10 2013 12:44:47

%S 1,1,1,3,4,5,13,17,23,54,75,106,224,329,482,942,1436,2163,4004,6255,

%T 9619,17144,27220,42513,73785,118402,187082,318715,514958,820744,

%U 1380185,2239747,3592811,5987313,9742606,15703097,26004453,42385083

%N Number of compositions of n such that two adjacent parts are not equal modulo 3.

%D I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983,(Problem 2.4.13).

%F G.f.: -(x^3-x-1)*(x^3-x^2-1)/(x^9-x^8-x^7-2*x^6+x^5+x^4+4*x^3-1). Generally, g.f. for the number of compositions of n such that two adjacent parts are not equal modulo p is 1/(1-Sum_{i=1..p} x^i/(1+x^i-x^p)).

%Y Cf. A003242, A062200-A062203.

%K nonn

%O 0,4

%A _Vladeta Jovovic_, Jun 13 2001