login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026097 a(n) = number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2,3; |s(i) - s(i-1)| <= 1 for i >= 4. Also a(n) = sum of numbers in row n+1 of the array T defined in A026082 and a(n) = 24*3^(n-4) for n >= 4. 2

%I #44 May 14 2022 13:32:22

%S 1,2,4,8,24,72,216,648,1944,5832,17496,52488,157464,472392,1417176,

%T 4251528,12754584,38263752,114791256,344373768,1033121304,3099363912,

%U 9298091736,27894275208,83682825624,251048476872,753145430616,2259436291848

%N a(n) = number of (s(0), s(1), ..., s(n)) such that every s(i) is an integer, s(0) = 0, |s(i) - s(i-1)| = 1 for i = 1,2,3; |s(i) - s(i-1)| <= 1 for i >= 4. Also a(n) = sum of numbers in row n+1 of the array T defined in A026082 and a(n) = 24*3^(n-4) for n >= 4.

%C Also length of successive strings generated by an alternating Kolakoski (2,4) rule starting at 4 (i.e. string begins with 2 if previous string ends with 4 and vice et versa) : 4-->2222-->44224422-->444422224422444422224422-->... and length of strings are 1,4,8,24,72,... - _Benoit Cloitre_, Oct 15 2005

%C Also number of words of length n over alphabet {1,2,3} with no fixed points (a fixed point is value i in position i). - _Margaret Archibald_, Jun 23 2020

%D M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

%H Vincenzo Librandi, <a href="/A026097/b026097.txt">Table of n, a(n) for n = 0..1000</a>

%H M. Archibald, A. Blecher, and A. Knopfmacher, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Blecher/arch14.html">Fixed Points in Compositions and Words</a>, J. Int. Seq., Vol. 23 (2020), Article 20.11.1.

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (3).

%F a(n) = 3*a(n-1) for n>3. G.f.: (4*x^3+2*x^2+x-1) / (3*x-1). - _Colin Barker_, Jun 15 2013

%F a(n) = floor( (4*n-2)/(n+1) )*a(n-1). Without the floor function the recursion gives the Catalan numbers (A000108). - _Hauke Woerpel_, Oct 16 2020

%t CoefficientList[Series[(4 x^3 + 2 x^2 + x - 1)/(3 x - 1), {x, 0, 30}], x] (* _Vincenzo Librandi_, Oct 18 2013 *)

%t Join[{1,2,4},NestList[3#&,8,30]] (* _Harvey P. Dale_, May 14 2022 *)

%o (PARI) a(n)=if(n>3,8/27*3^n,2^n) \\ _Charles R Greathouse IV_, Jun 23 2020

%Y Essentially the same as A005051.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 20:04 EDT 2024. Contains 372176 sequences. (Running on oeis4.)