OFFSET
1,2
COMMENTS
Terms are palindromic. If b_3(n) denotes the number of 3's in a(n) then b(n) satisfies the recursion: b_3(1)=0, b_3(2)=1 and b_3(n) = b_3(n-1) + b_3(n-2) + (-1)^n so that b_3(2n)=A055588(n) and b_3(2n+1)=A027941(n). If b_1(n) denotes the number of 1's: b_1(1)=1, b_1(2)=0 and b_1(n) = b_1(n-1) + b_1(n-2) - 2*(-1)^n so that b_1(2n)=A004146(n) and b_1(2n+1) = A000032(n-2) - 2.
FORMULA
EXAMPLE
1 --> 3 --> 111 --> 313 --> 1113111 --> 313111313
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 12 2005
STATUS
approved