OFFSET
0,3
COMMENTS
Let S(i,j,x,n) denote a sequence of the form a(0) = i, a(1)=j, a(n) = n*a(n-1) + x*a(n-2). Then S(i,j,x,n)= i* Sum_{k=0..floor(n/2+1)} ((n-k-2)!*binomial(n-k,k+2)*x^(k+1)/k!) + j*Sum_{k=0..floor((n+1)/2)} (n-k)!*binomial(n-k-1,k)*x^k/(k+1)!), n>1.
Other sequences of this form are:
S(0,1,1,n): A001053(n+1),
S(1,0,1,n): A058307(n+1),
S(1,1,1,n): A001040.
In cases where i = j=1 the above formula can be reduced to S(1,1,x,n) = Sum_{k =0..floor(n/2)} (((n-k)!/k!)*binomial(n-k,k)*x^k). - Gary Detlefs and Wolfdieter Lang, Mar 06 2013
From Wolfdieter Lang, Mar 08 2013: (Start)
a(n) = Q(n,3), the row polynomial of A084950 evaluated for x=3, is the denominator of the n-th approximation to the continued fraction 1/(1+3/(2+3/(3+3/(4+... The corresponding numerator is A222472(n). The limit of this continued fraction is (z/6)*BesselI(1,z)/BesselI(0,z), with z= 2*sqrt(3) which is 0.4845161749874040...
E.g.f.: a(n) = (Pi*x/(2*sqrt(1-z)))*(BesselJ(1, x*sqrt(1-z))*BesselY(0,x) - BesselY(1, x*sqrt(1-z))*BessJ(0,x)) with x := 2*sqrt(-3).
For a combinatorial interpretation in terms of labeled Morse codes see a comment and reference on A084950. Here each dash has label x = 3, and the dots have label j if they are at position j. Labels are multiplied and for a(n) all labeled codes on [1,2,...,n] have to be summed. (End)
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..445 (terms 0..250 from Reinhard Zumkeller)
FORMULA
a(0)=1, a(1)=1, a(n) = Sum_{k=0..floor(n/2+1)} ((n-k-2)!*binomial(n-k,k+2)*3^(k+1)/k!) + Sum_{k=0..floor((n+1)/2)} (n-k)!*binomial(n-k-1,k)*3^k/(k+1)!), n>1.
a(n) = 2*sqrt(3)^(n+1)*(BesselI(0, 2*sqrt(3))*BesselK(n+1, 2*sqrt(3)) - BesselK(0, 2*sqrt(3))*BesselI(n+1, -2*sqrt(3))), n >= 0. See Q(n,3) from A084950. - Wolfdieter Lang, Mar 06 2013
a(n) = Sum_{k=0..floor(n/2)} (((n-k)!/k!)*binomial(n-k,k)*3^k). - Gary Detlefs and Wolfdieter Lang, Mar 06 2013
Asymptotics: limit(a(n)/n!, n -> infinity) = BesselI(0,2*sqrt(3)) = 7.15899653680... See a comment on the large n behavior of Bessel functions under A084950. - Wolfdieter Lang, Mar 08 2013
EXAMPLE
From Wolfdieter Lang, Mar 08 2013: (Start)
a(4) = 4*a(3) + 3*a(2) = 4*18 + 3*5 = 87.
Morse code: a(4) = 87 from the sum of all 5 labeled codes on [1,2,3,4], one with no dash, three with one dash and one with two dashes: 4! + (3*4 + 1*4 + 1*2)*(3) + (3)^2 = 87. (End)
MAPLE
A:=(n, x)->sum((n-k-2)!*binomial(n-k, k+2)*x^(k+1)/k!, k=0..floor(n/2+1))
B:=(n, x)->sum(n-k)!*binomial(n-k-1, k)*x^k/(k+1)!, k=0..floor((n+1)/2))
seq(A(n, 3)+B(n, 3), n=2..20)
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 1, a[n] == n*a[n - 1] + 3 a[n - 2]}, a[n], {n, 50}] (* G. C. Greubel, Aug 16 2017 *)
PROG
(PARI) a(n) = sum(k=0, n\2, ((n-k)!/k!)*binomial(n-k, k)*3^k); /* Joerg Arndt, Mar 07 2013 */
(Haskell)
a213190 n = a213190_list !! n
a213190_list = 1 : 1 : zipWith (+)
(zipWith (*) [2..] $ tail a213190_list) (map (* 3) a213190_list)
-- Reinhard Zumkeller, Feb 20 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary Detlefs, Feb 28 2013
STATUS
approved