cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A242510 Number of n-length words on {1,2,3} such that the maximal blocks (runs) of 1's have odd length, the maximal blocks of 2's have even length and the maximal blocks of 3's have odd length.

This page as a plain text file.
%I A242510 #18 Jun 13 2015 00:55:02
%S A242510 1,2,3,8,15,32,67,138,289,600,1249,2600,5409,11258,23427,48752,101455,
%T A242510 211128,439363,914322,1902721,3959600,8240001,17147600,35684481,
%U A242510 74260082,154536643,321593688,669242575,1392706512,2898248707
%N A242510 Number of n-length words on {1,2,3} such that the maximal blocks (runs) of 1's have odd length, the maximal blocks of 2's have even length and the maximal blocks of 3's have odd length.
%H A242510 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,1,-1).
%F A242510 G.f.: (1 + x - x^2)/(1 - x - 2*x^2 - x^3 +x^4).
%F A242510 a(n) = a(n-1) +2*a(n-2) +a(n-3) -a(n-4). - _Fung Lam_, May 18 2014
%e A242510 a(3)=8 because we have: 111, 122, 131, 221, 223, 313, 322, 333.
%t A242510 n=3;nn=30;CoefficientList[Series[1/(1-Sum[v[i]/(1+v[i]),{i,1,n}])/.Join[Table[v[i]->z/(1-z^2),{i,1,n,2}],Table[v[i]->z^2/(1-z^2),{i,2,n,2}]],{z,0,nn}],z]
%t A242510 (* Changing n=3 at the beginning of this code to n = k, (for k a positive integer) will return the number of n-length words on {1,2,...,k} where the maximal run lengths of odd integers are odd and the maximal run lengths of even integers are even. *)
%Y A242510 Cf. A062200, A242536, A242537.
%K A242510 nonn
%O A242510 0,2
%A A242510 _Geoffrey Critzer_, May 16 2014