cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A213190 a(0)=1, a(1)=1, a(n) = n*a(n-1) + 3*a(n-2).

Original entry on oeis.org

1, 1, 5, 18, 87, 489, 3195, 23832, 200241, 1873665, 19337373, 218332098, 2677997295, 35468961129, 504599447691, 7675398598752, 124320175923105, 2136469186489041, 38829405884572053, 744168119366336130, 14999850604980438759, 317229367062688222329
Offset: 0

Views

Author

Gary Detlefs, Feb 28 2013

Keywords

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.
For a more advanced treatment of this topic see A084950 and A221913.
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)

Examples

			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)
		

Crossrefs

Programs

  • 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
  • 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 *)
  • PARI
    a(n) = sum(k=0, n\2, ((n-k)!/k!)*binomial(n-k,k)*3^k); /* Joerg Arndt, Mar 07 2013 */
    

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: lim_{n->oo} a(n)/n! = 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

A303224 a(0)=0, a(1)=1; for n>1, a(n) = n*a(n-1) - 3*a(n-2).

Original entry on oeis.org

0, 1, 2, 3, 6, 21, 108, 693, 5220, 44901, 433350, 4632147, 54285714, 691817841, 9522592632, 140763435957, 2223647197416, 37379712048201, 666163875275370, 12544974494087427, 248900998255922430, 5189286039892108749, 113417589882858625188, 2593036709186072053077, 61892628250817153398284
Offset: 0

Views

Author

Bruno Berselli, Apr 20 2018

Keywords

Comments

a(n) is divisible by 3^floor(n/3).

Crossrefs

Cf. A058798: a(n) = n*a(n-1) - a(n-2).
Cf. A222470: a(n) = n*a(n-1) - 2*a(n-2), without 0.
Cf. A222472: a(n) = n*a(n-1) + 3*a(n-2), without 0.
Cf. A221913.

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == n a[n - 1] - 3 a[n - 2]}, a, {n, 0, 30}]
    Flatten[{0, Table[n!*HypergeometricPFQ[{1/2 - n/2, 1 - n/2}, {2, 1 - n, -n}, -12], {n, 1, 25}]}] (* Vaclav Kotesovec, Apr 20 2018 *)
    Round[Table[-2 I^n 3^(n/2) (BesselI[1 + n, -2 I Sqrt[3]] BesselK[1, -2 I Sqrt[3]] + (-1)^n BesselI[1, 2 I Sqrt[3]] BesselK[1 + n, -2 I Sqrt[3]]), {n, 0, 25}]] (* Vaclav Kotesovec, Apr 20 2018 *)
  • PARI
    a=vector(30); a[1]=0; a[2]=1; for(n=3, #a, a[n]=(n-1)*a[n-1]-3*a[n-2]); a

Formula

From Peter Bala, Apr 20 2018: (Start)
a(n) = Sum_{k = 0..floor((n-1)/2)} (-3)^k*binomial(n-k,k+1)*binomial(n-k-1,k)*(n-2*k-1)!.
a(n)/n! ~ BesselJ(1, 2*sqrt(3)) / sqrt(3). (End)
a(n) = -2 * i^n * 3^(n/2) * (BesselI(1+n, -2*i*sqrt(3)) * BesselK(1,-2*i*sqrt(3)) + (-1)^n * BesselI(1, 2*i*sqrt(3)) * BesselK(1+n, -2*i*sqrt(3))), where i is the imaginary unit. - Vaclav Kotesovec, Apr 20 2018
Showing 1-2 of 2 results.