This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A108122 G.f.: (1-2*x^2)/(1-x-2*x^2-x^3). 1
 1, 1, 1, 4, 7, 16, 34, 73, 157, 337, 724, 1555, 3340, 7174, 15409, 33097, 71089, 152692, 327967, 704440, 1513066, 3249913, 6980485, 14993377, 32204260, 69171499, 148573396, 319120654, 685438945, 1472253649, 3162252193, 6792198436, 14588956471, 31335605536 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS The sequence counts row lengths of an array in which rows are obtained by the substitution 1->2, 2->3, 3->1,2,2,3 from previous rows: 1; 2; 3; 1,2,2,3; 2,3,3,1,2,2,3; 3,1,2,2,3,1,2,2,3,2,3,3,1,2,2,3; LINKS Robert Israel, Table of n, a(n) for n = 0..303 Index entries for linear recurrences with constant coefficients, signature (1,2,1). FORMULA a(n) = a(n-1) + 2*a(n-2) + a(n-3), starting 1,1,1. a(n) = A002478(n) - 2*A002478(n-2), n>1. a(n) = sum(m=0..n/2, sum(i=0..m, 2^i*binomial(n-2*m+1,m-i)*binomial(n-2*m+i,n-2*m))). - Vladimir Kruchinin, Dec 17 2011 MAPLE a[0], a[1], a[2]:= 1, 1, 1: for n from 3 to 100 do   a[n]:= a[n-1]+2*a[n-2]+a[n-3] od: seq(a[i], i=0..100); # Robert Israel, Jun 15 2014 MATHEMATICA s[1] = {2}; s[2] = {3}; s[3] = {1, 2, 2, 3}; t[a_] := Flatten[s /@ a]; p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]] a0 = Table[Length[p[i]], {i, 0, 20}] f[n_] := Sum[ 2^i*Binomial[n - 2 m, m - i]*Binomial[n - 2 m + i - 1, n - 2 m - 1], {m, 0, (n - 1)/2}, {i, 0, m}]; f[0] = 1; Array[f, 33, 0] (* or *) CoefficientList[ Series[(1 - 2 x^2)/(1 - x - 2 x^2 - x^3), {x, 0, 33}], x] (* or *) LinearRecurrence[ {1, 2, 1}, {1, 1, 1}, 34] (* or *) Length /@ NestList[ Flatten[ # /. {1 -> 2, 2 -> 3, 3 -> {1, 2, 2, 3}}] &, {1}, 24] (* Robert G. Wilson v, Jun 13 2014 *) PROG (Maxima) a(n):=sum(sum(2^i*binomial(n-2*m+1, m-i)*binomial(n-2*m+i, n-2*m), i, 0, m), m, 0, (n)/2); /* Vladimir Kruchinin, Dec 17 2011 */ CROSSREFS Cf. A078007, A101399. Sequence in context: A285654 A051049 A298415 * A192800 A027609 A145763 Adjacent sequences:  A108119 A108120 A108121 * A108123 A108124 A108125 KEYWORD nonn,easy AUTHOR Roger L. Bagula, Jun 04 2005 EXTENSIONS More terms from Wesley Ivan Hurt, Jun 14 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 25 10:23 EDT 2019. Contains 321470 sequences. (Running on oeis4.)