



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, 5768, 8904, 10609, 16377, 19513, 30122, 35890, 55403, 66012, 101902, 121415, 187427, 223317, 344732, 410744, 634061, 755476, 1166220
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

Bruce (see link) formulated the sequence using the following two equations:
a(2n) = a(2n1)+a(2n3),
a(2n+1) = a(2n1)+a(2n2),
with n>1 and initial conditions a(1)=a(2)=a(3)= 1.
These equations lead to a pair of tribonaccitype recurrence equations, for n>2:
a(2n+1) = a(2n1)+a(2n3)+a(2n5),
a(2n+2) = a(2n)+a(2n2)+a(2n4).
It could be more appropriate to consider the sequence as a kind of two dimensional tribonacci sequence (a(2n1),(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 componentwise. 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.
One method to construct the two dimensional sequence is by using the wellknown tribonaccirelated morphism f with f(a) = ab, f(b) = ac, f(c) = a on the monoid of strings over the alphabet {a, b, c}. Using componentwise 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 twodimensional sequence.


LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Ian Bruce, A Modified Tribonacci Sequence, The Fibonacci Quarterly 22, no.3 (1984), 244246.
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,1).


FORMULA

G.f.: x*(1+x+x^3)/(1x^2x^4x^6). [corrected by G. C. Greubel, Nov 03 2018]
a(1) = a(2) = a(3) = 1; for n>1:
a(2n) = a(2n1) + a(2n3),
a(2n+1) = a(2n1) + a(2n2).


EXAMPLE

The first 14 pairs of string and its length are
(c, 1);
(b, 1);
(a, 1);
(ac, 2);
(ab, 2);
(aba, 3);
(abac, 4);
(abacab, 6);
(abacaba, 7);
(abacabaabac, 11);
(abacabaabacab, 13);
(abacabaabacababacaba, 20);
(abacabaabacababacabaabac, 24);
(abacabaabacababacabaabacabacabaabacab, 37); ...


MAPLE

with(StringTools):
# The following procedure defines the morphism f
Morphf := proc (x::string) local Start, L, Init, i;
Init := x;
L := length(Init);
Start := 1;
for i from Start to 2*L do
if Init[i] = "c" then
Init := Insert(Init, i, "a"); i := i+1; L := L+1;
Init := Delete(Init, i1 .. i1); i := i1; L := L1;
elif Init[i] = "b" then
Init := Insert(Init, i, "ac"); i := i+2; L := L+2;
Init := Delete(Init, i2 .. i2); i := i1; L := L1;
elif Init[i] = "a" then
Init := Insert(Init, i, "b"); i := i+1; L := L+1;
end if;
end do;
eval(Init);
end proc:
#The following procedure is intended to create sequence of
#strings c, b, a, ac, ab, aba, abac, ..., etc, obtained by
#iterating the morphism f n times but it starts from the third
#string "a", i.e. leaving the first two strings "c" and "b"
#behind:
TribWord := proc (x1, x2::string, n) local A, B, C, i;
A := x1; B := x2;
for i to n do
if type(i, odd) = true then
A := Morphf(A);
C := A;
else
B := Morphf(B); C := B
end if;
end do;
eval(C);
end proc;
#The following command will print a(1), a(2), ..., a(30).
for i to 30 do
printf("%d%s", length(TribWord("c", "b", i2)), `, `);
end do


MATHEMATICA

LinearRecurrence[{0, 1, 0, 1, 0, 1}, {1, 1, 1, 2, 2, 3}, 48] (* Bruno Berselli, Jun 25 2012 *)


PROG

(PARI) x='x+O('x^50); Vec(x*(1+x+x^3)/(1x^2x^4x^6)) \\ G. C. Greubel, Nov 03 2018
(MAGMA) I:=[1, 1, 1, 2, 2, 3]; [n le 6 select I[n] else Self(n2) + Self(n4) + Self(n6): n in [1..50]]; // G. C. Greubel, Nov 03 2018


CROSSREFS

Cf. A000073.
Sequence in context: A320270 A274156 A094860 * A065417 A005860 A266900
Adjacent sequences: A213813 A213814 A213815 * A213817 A213818 A213819


KEYWORD

nonn,easy


AUTHOR

Loeky Haryanto, Jun 22 2012


STATUS

approved



