[go: up one dir, main page]

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!)
A213816 Tribonacci sequences A000073 and A001590 interleaved. 5

%I #56 Sep 08 2022 08:46:02

%S 1,1,1,2,2,3,4,6,7,11,13,20,24,37,44,68,81,125,149,230,274,423,504,

%T 778,927,1431,1705,2632,3136,4841,5768,8904,10609,16377,19513,30122,

%U 35890,55403,66012,101902,121415,187427,223317,344732,410744,634061,755476,1166220

%N Tribonacci sequences A000073 and A001590 interleaved.

%C Bruce (see link) formulated the sequence using the following two equations:

%C a(2n) = a(2n-1)+a(2n-3),

%C a(2n+1) = a(2n-1)+a(2n-2),

%C with n>1 and initial conditions a(1)=a(2)=a(3)= 1.

%C These equations lead to a pair of tribonacci-type recurrence equations, for n>2:

%C a(2n+1) = a(2n-1)+a(2n-3)+a(2n-5),

%C a(2n+2) = a(2n)+a(2n-2)+a(2n-4).

%C It could be more appropriate to consider the sequence as a kind of two-dimensional tribonacci sequence (a(2n-1),(a(2n)), i.e. as (1, 1), (1, 2), (2, 3), (4, 6), (7, 11), (13, 20), (24, 37), (44, 68), (81, 125), (149, 230), (274, 423), (504, 778), (927, 1431), (1705, 2632), (3136, 4841),... since after the first three initial pairs, the next pair can be obtained by adding three previous pairs component-wise. However, the first three initial pairs (1, 1), (1, 2), (2, 3) are redundant in comparison with the original integer sequence that needs only three initial integers 1, 1 and 1.

%C One method to construct the two-dimensional sequence is by using the well-known tribonacci-related morphism f with f(a) = ab, f(b) = ac, f(c) = a on the monoid of strings over the alphabet {a, b, c}. Using component-wise map, the following sequence of pairs is obtained: (c,b), (a, ac), (ab, aba), (abac, abacab), (abacaba, abacabaabac), (abacabaabacab, abacabaabacababacaba), ...; which is initialized by the pair (c,b) and any pair (x,y) is followed by (f(x),f(y)). The length of every string in every component consitutes the two-dimensional sequence.

%H Vincenzo Librandi, <a href="/A213816/b213816.txt">Table of n, a(n) for n = 1..1000</a>

%H Ian Bruce, <a href="https://www.fq.math.ca/Scanned/22-3/bruce.pdf">A Modified Tribonacci Sequence</a>, The Fibonacci Quarterly 22, no.3 (1984), 244-246.

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

%F G.f.: x*(1+x+x^3)/(1-x^2-x^4-x^6). [corrected by _G. C. Greubel_, Nov 03 2018]

%F a(1) = a(2) = a(3) = 1; for n>1:

%F a(2n) = a(2n-1) + a(2n-3),

%F a(2n+1) = a(2n-1) + a(2n-2).

%e The first 14 pairs of string and its length are

%e (c, 1);

%e (b, 1);

%e (a, 1);

%e (ac, 2);

%e (ab, 2);

%e (aba, 3);

%e (abac, 4);

%e (abacab, 6);

%e (abacaba, 7);

%e (abacabaabac, 11);

%e (abacabaabacab, 13);

%e (abacabaabacababacaba, 20);

%e (abacabaabacababacabaabac, 24);

%e (abacabaabacababacabaabacabacabaabacab, 37); ...

%p with(StringTools):

%p # The following procedure defines the morphism f

%p Morphf := proc (x::string) local Start, L, Init, i;

%p Init := x;

%p L := length(Init);

%p Start := 1;

%p for i from Start to 2*L do

%p if Init[i] = "c" then

%p Init := Insert(Init, i, "a"); i := i+1; L := L+1;

%p Init := Delete(Init, i-1 .. i-1); i := i-1; L := L-1;

%p elif Init[i] = "b" then

%p Init := Insert(Init, i, "ac"); i := i+2; L := L+2;

%p Init := Delete(Init, i-2 .. i-2); i := i-1; L := L-1;

%p elif Init[i] = "a" then

%p Init := Insert(Init, i, "b"); i := i+1; L := L+1;

%p end if;

%p end do;

%p eval(Init);

%p end proc:

%p #The following procedure is intended to create sequence of

%p #strings c, b, a, ac, ab, aba, abac, ..., etc, obtained by

%p #iterating the morphism f n times but it starts from the third

%p #string "a", i.e. leaving the first two strings "c" and "b"

%p #behind:

%p TribWord := proc (x1, x2::string, n) local A, B, C, i;

%p A := x1; B := x2;

%p for i to n do

%p if type(i, odd) = true then

%p A := Morphf(A);

%p C := A;

%p else

%p B := Morphf(B); C := B

%p end if;

%p end do;

%p eval(C);

%p end proc;

%p #The following command will print a(1), a(2), ..., a(30).

%p for i to 30 do

%p printf("%d%s", length(TribWord("c", "b", i-2)), `, `);

%p end do

%t LinearRecurrence[{0, 1, 0, 1, 0, 1}, {1, 1, 1, 2, 2, 3}, 48] (* _Bruno Berselli_, Jun 25 2012 *)

%o (PARI) x='x+O('x^50); Vec(x*(1+x+x^3)/(1-x^2-x^4-x^6)) \\ _G. C. Greubel_, Nov 03 2018

%o (Magma) I:=[1, 1, 1, 2, 2, 3]; [n le 6 select I[n] else Self(n-2) + Self(n-4) + Self(n-6): n in [1..50]]; // _G. C. Greubel_, Nov 03 2018

%Y Cf. A000073.

%K nonn,easy

%O 1,4

%A _Loeky Haryanto_, Jun 22 2012

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 August 29 15:03 EDT 2024. Contains 375517 sequences. (Running on oeis4.)