OFFSET
0,2
LINKS
FORMULA
G.f.: (1+5*x+5*x^2)/(1-x-4*x^2).
For n>=3, the recurrence is a(n) = a(n-1) + 4*a(n-2), a(1)=6, a(2)=15.
a(n) = 3*((13+3*sqrt(17))*z1^n-(13-3*sqrt(17))*z2^n)/(8*sqrt(17)), where z1=(1+sqrt(17))/2 and z2=(1-sqrt(17))/2.
EXAMPLE
For n=2 the 15 strings are: 12, 16, 21, 22, 23, 32, 34, 41, 43, 44, 54, 56, 61, 65, 66.
For n=3 the 39 strings are: 121, 122, 123, 161, 165, 166, 212, 216, 221, 222, 223, 232, 234, 321, 322, 323, 341, 343, 344, 412, 416, 432, 434, 441, 443, 444, 541, 543, 544, 561, 565, 566, 612, 616, 654, 656, 661, 665, 666.
MATHEMATICA
CoefficientList[Series[(1 + 5 x + 5 x^2)/(1 - x - 4 x^2), {x, 0, 29}], x] (* Michael De Vlieger, Oct 07 2016 *)
PROG
(PARI) Vec((1+5*x+5*x^2)/(1-x-4*x^2) + O(x^40)) \\ Michel Marcus, Oct 06 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefan Hollos, Oct 06 2016
STATUS
approved