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-10 of 16 results. Next

A121954 Incorrect duplicate of A058307.

Original entry on oeis.org

0, 1, 3, 13, 68, 420, 3015, 24541, 223884, 2263381, 25121075, 303716281, 3973432728, 55931774473, 842950049823, 13543132571641, 231076203767720, 4172914800390601
Offset: 0

Views

Author

Keywords

A001040 a(n+1) = n*a(n) + a(n-1) with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 3, 10, 43, 225, 1393, 9976, 81201, 740785, 7489051, 83120346, 1004933203, 13147251985, 185066460993, 2789144166880, 44811373131073, 764582487395121, 13807296146243251, 263103209266016890, 5275871481466581051, 111056404320064218961, 2448516766522879398193
Offset: 0

Views

Author

Keywords

Comments

If the initial 0 and 1 are omitted, CONTINUANT transform of 1, 2, 3, 4, 5, ...
a(n+1) is the numerator of the continued fraction given by C(n) = [n, n-1,...,3,2,1], e.g., [1] = 1, [2,1]=3, [3,2,1] = 10/3, [4,3,2,1] = 43/10 etc. Cf. A001053. - Amarnath Murthy, May 02 2001
Along those lines, a(n) is the denominator of the continued fraction [n,n-1,...3,2,1] and is the numerator of the continued fraction [1,2,3,...,n-1]. - Greg Dresden, Feb 20 2020
Starting (1, 3, 10, 43, ...) = eigensequence of triangle A127701. - Gary W. Adamson, Dec 29 2008
For n >=2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 1's along the superdiagonal and the subdiagonal, and consecutive integers from 1 to n along the main diagonal (see Mathematica program below). - John M. Campbell, Jul 08 2011
Generally, solution of the recurrence a(n+1) = n*a(n) + a(n-1) is a(n) = BesselI(n,-2)*(2*a(0)*BesselK(1,2)-2*a(1)*BesselK(0,2)) + (2*a(0)*BesselI(1,2)+2*a(1)*BesselI(0,2))*BesselK(n,2), and asymptotic is a(n) ~ (a(0)*BesselI(1,2)+a(1)*BesselI(0,2)) * (n-1)!. - Vaclav Kotesovec, Jan 05 2013
For n > 0: a(n) = A058294(n,n) = A102473(n,n) = A102472(n,1). - Reinhard Zumkeller, Sep 14 2014
Conjecture: 2*n!*a(n) is the number of open tours by a rook on an (n X 2) chessboard which ends at the opposite line of length n. - Mikhail Kurkov, Nov 19 2019

Examples

			G.f. = x + x^2 + 3*x^3 + 10*x^4 + 43*x^5 + 225*x^6 + 1393*x^7 + 9976*x^8 + ...
		

References

  • Archimedeans Problems Drive, Eureka, 22 (1959), 15.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A column of A058294. Cf. A001053.
Cf. A127701. - Gary W. Adamson, Dec 29 2008
Similar recurrences: A001053, A058279, A058307. - Wolfdieter Lang, May 19 2010

Programs

  • Haskell
    a001040 n = a001040_list !! n
    a001040_list = 0 : 1 : zipWith (+)
       a001040_list (zipWith (*) [1..] $ tail a001040_list)
    -- Reinhard Zumkeller, Mar 05 2013
    
  • Magma
    a:=[1,1]; [0] cat [n le 2 select a[n] else (n-1)*Self(n-1) + Self(n-2): n in [1..23]]; // Marius A. Burtea, Nov 19 2019
  • Maple
    A001040 := proc(n)
        if n <= 1 then
            n;
        else
            (n-1)*procname(n-1)+procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, Mar 13 2015
  • Mathematica
    Table[Permanent[Array[KroneckerDelta[#1, #2]*(#1) + KroneckerDelta[#1, #2 - 1] + KroneckerDelta[#1, #2 + 1] &, {n - 1, n - 1}]], {n, 2, 30}] (* John M. Campbell, Jul 08 2011 *)
    Join[{0},RecurrenceTable[{a[0]==1,a[1]==1,a[n]==n a[n-1]+a[n-2]}, a[n], {n,30}]] (* Harvey P. Dale, Aug 14 2011 *)
    FullSimplify[Table[2(-BesselI[n,-2]BesselK[0,2]+BesselI[0,2]BesselK[n,2]),{n,0,20}]] (* Vaclav Kotesovec, Jan 05 2013 *)
  • PARI
    {a(n) = contfracpnqn( vector(abs(n), i, i))[1, 2]}; /* Michael Somos, Sep 25 2005 */
    
  • Sage
    def A001040(n):
        if n < 2: return n
        return factorial(n-1)*hypergeometric([1-n/2,-n/2+1/2], [1,1-n,1-n], 4)
    [round(A001040(n).n(100)) for n in (0..23)] # Peter Luschny, Sep 10 2014
    

Formula

Generalized Fibonacci sequence for (unsigned) Laguerre triangle A021009. a(n+1) = sum{k=0..floor(n/2), C(n-k, k)(n-k)!/k!}. - Paul Barry, May 10 2004
a(-n) = a(n) for all n in Z. - Michael Somos, Sep 25 2005
E.g.f.: -I*Pi*(BesselY(1, 2*I)*BesselI(0, 2*sqrt(1-x)) - I*BesselI(1, 2)*BesselY(0, 2*I*sqrt(1-x))). Such e.g.f. computations were the result of an e-mail exchange with Gary Detlefs. After differentiation and putting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p. 360, 9.1.16 and p. 375, 9.63. - Wolfdieter Lang, May 19 2010
Limit_{n->infinity} a(n)/(n-1)! = BesselI(0,2) = 2.279585302336... (see A070910). - Vaclav Kotesovec, Jan 05 2013
a(n) = 2*(BesselI(0,2)*BesselK(n,2) - BesselI(n,-2)*BesselK(0,2)). - Vaclav Kotesovec, Jan 05 2013
a(n) = (n-1)!*hypergeometric([1-n/2,1/2-n/2],[1,1-n,1-n], 4) for n >= 2. - Peter Luschny, Sep 10 2014
0 = a(n)*(-a(n+2)) + a(n+1)*(+a(n+1) + a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) for all n in Z. - Michael Somos, Sep 13 2014
Observed: a(n) = A070910*(n-1)!*(1 + 1/(n-1) + 1/(2*(n-1)^2) + O((n-1)^-3)). - A.H.M. Smeets, Aug 19 2018
a(n) mod 2 = A166486(n). - Alois P. Heinz, Jul 03 2023

Extensions

Definition clarified by A.H.M. Smeets, Aug 19 2018

A001053 a(n+1) = n*a(n) + a(n-1) with a(0)=1, a(1)=0.

Original entry on oeis.org

1, 0, 1, 2, 7, 30, 157, 972, 6961, 56660, 516901, 5225670, 57999271, 701216922, 9173819257, 129134686520, 1946194117057, 31268240559432, 533506283627401, 9634381345852650, 183586751854827751, 3681369418442407670, 77492344539145388821, 1708512949279640961732
Offset: 0

Views

Author

Keywords

Comments

Denominator of continued fraction given by C(n) = [ 1; 2,3,4,...n ]. Cf. A001040. - Amarnath Murthy, May 02 2001
If initial 1 is omitted, CONTINUANT transform of 0, 1, 2, 3, 4, 5, ...
Number of deco polyominoes of height n having no 1-cell columns. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(2)=1 because the vertical and horizontal dominoes are the deco polyominoes of height 2, of which only the vertical domino does not have 1-cell columns. a(n)=A121554(n,0). - Emeric Deutsch, Aug 16 2006
For positive n, a(n) equals the permanent of the n X n tridiagonal matrix with 1's along the superdiagonal and the subdiagonal, and consecutive integers from 0 to n-1 along the main diagonal (see Mathematica code below). - John M. Campbell, Jul 08 2011
Conjecture: 2*n!*a(n) is the number of open tours by a rook on an (n X 2) chessboard which starts and ends at the same line of length n. - Mikhail Kurkov, Nov 19 2019

Examples

			G.f. = 1 + x^2 + 2*x^3 + 7*x^4 + 30*x^5 + 157*x^6 + 972*x^7 + 6961*x^8 + ...
a(5) = 4*a(4) + a(3) = 4*7+2 = 30.
See A058279 and A058307 for similar recurrences and e.g.f.s. - _Wolfdieter Lang_, May 19 2010
		

References

  • Archimedeans Problems Drive, Eureka, 20 (1957), 15.
  • M. E. Larsen, Summa Summarum, A. K. Peters, Wellesley, MA, 2007; see p. 35. [From N. J. A. Sloane, Jan 29 2009]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A column of A058294.
The square roots of the terms of A144656.
See also the constant in A060997.

Programs

  • GAP
    a:=[0,1];; for n in [3..25] do a[n]:=(n-1)*a[n-1]+a[n-2]; od; Concatenation([1], a); # G. C. Greubel, Sep 20 2019
  • Haskell
    a001053 n = a001053_list !! n
    a001053_list = 1 : 0 :
       zipWith (+) a001053_list (zipWith (*) [1..] $ tail a001053_list)
    -- Reinhard Zumkeller, Nov 02 2011
    
  • Magma
    I:=[0,1]; [1] cat [n le 2 select I[n] else (n-1)*Self(n-1) + Self(n-2): n in [1..25]]; // G. C. Greubel, Sep 20 2019
    
  • Maple
    a[0]:=1: a[1]:=0: for n from 2 to 23 do a[n]:=(n-1)*a[n-1]+a[n-2] od: seq(a[n],n=0..23); # Emeric Deutsch, Aug 16 2006
  • Mathematica
    a[0]=1; a[1] =0; a[n_]:= (n-1)*a[n-1] + a[n-2]; Table[a[n], {n, 0, 21}] (* Robert G. Wilson v, Feb 24 2005 *)
    a[0] = 1; a[1] = 0; a[n_] := Permanent[SparseArray[{{i_, i_} :> i-1, Band[{2, 1}] -> 1, Band[{1, 2}] -> 1}, {n, n}]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 20}] (* John M. Campbell, Jul 08 2011, updated by Jean-François Alcover, Nov 14 2016 *)
    RecurrenceTable[{a[0]==1,a[1]==0,a[n]==(n-1)a[n-1]+a[n-2]},a,{n,30}] (* Harvey P. Dale, Jan 31 2013 *)
    a[ n_] := With[ {m = Abs@n}, If[ m < 2, Boole[m == 0],
    Gamma[m] HypergeometricPFQ[{3/2 - m/2, 1 - m/2}, {2, 2 - m, 1 - m}, 4]]]; (* Michael Somos, Nov 30 2018 *)
  • PARI
    {a(n) = contfracpnqn(vector(abs(n), i, i))[2, 2]}; /* Michael Somos, Sep 25 2005 */
    
  • Sage
    def A001053(n):
        if n < 3: return 1 if n != 1 else 0
        return gamma(n)*hypergeometric([3/2-n/2,1-n/2], [2,2-n,1-n], 4)
    [round(A001053(n).n(100)) for n in (0..23)] # Peter Luschny, Sep 11 2014
    

Formula

a(n) = a(-n). for all n in Z. - Michael Somos, Sep 25 2005
E.g.f.: -Pi*(BesselI(1,2)*BesselY(0, 2*I*sqrt(1-x)) + I*BesselY(1, 2*I)*BesselI(0, 2*sqrt(1-x))). Such e.g.f. computations were the result of an e-mail exchange with Gary Detlefs. After differentiation and putting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p. 360, 9.1.16 and p. 375, 9.63. - Wolfdieter Lang, May 19 2010
a(n) = 2*K_1(2)*I_n(-2)+2*I_1(2)*K_n(2), where In(z) is the modified Bessel function of the first kind and Kn(x) is the modified Bessel function of the second kind. - Alexander R. Povolotsky, Jan 26 2011
Limit_{n->infinity} a(n)/(n-1)! = BesselI(1,2) = 1.590636854637329... (A096789). - Vaclav Kotesovec, Jan 05 2013, corrected Mar 02 2013
a(n+1) = Sum_{k = 0..floor((n-1)/2)} (n-2*k-1)!*binomial(n-k-1,k) * binomial(n-k,k+1). Cf. A058798. - Peter Bala, Aug 01 2013
a(n) = Gamma(n)*hypergeometric([3/2-n/2, 1-n/2], [2, 2-n, 1-n], 4) for n >= 3. - Peter Luschny, Sep 11 2014
0 = a(n)*(-a(n+2)) + a(n+1)*(a(n+1) + a(n+2) - a(n+3)) + a(n+2)*(a(n+2)) for all n in Z. - Michael Somos, Feb 09 2017
Observed: a(n) = A096789*(n-1)!*(1 + 1/(n-1) + 1/(2*(n-1)^2) + O((n-1)^-3)). - A.H.M. Smeets, Aug 19 2018

Extensions

More terms from James Sellers, Sep 19 2000

A058798 a(n) = n*a(n-1) - a(n-2) with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 5, 18, 85, 492, 3359, 26380, 234061, 2314230, 25222469, 300355398, 3879397705, 54011212472, 806288789375, 12846609417528, 217586071308601, 3903702674137290, 73952764737299909, 1475151592071860890
Offset: 0

Views

Author

Christian G. Bower, Dec 02 2000

Keywords

Comments

Note that a(n) = (a(n-1) + a(n+1))/(n+1). - T. D. Noe, Oct 12 2012; corrected by Gary Detlefs, Oct 26 2018
a(n) = log_2(A073888(n)) = log_3(A073889(n)).
a(n) equals minus the determinant of M(n+2) where M(n) is the n X n symmetric tridiagonal matrix with entries 1 just above and below its diagonal and diagonal entries 0, 1, 2, .., n-1. Example: M(4)=matrix([[0, 1, 0, 0], [1, 1, 1, 0], [0, 1, 2, 1], [0, 0, 1, 3]]). - Roland Bacher, Jun 19 2001
a(n) = A221913(n,-1), n>=1, is the numerator sequence of the n-th approximation of the continued fraction -(0 + K_{k>=1} (-1/k)) = 1/(1-1/(2-1/(3-1/(4-... The corresponding denominator sequence is A058797(n). - Wolfdieter Lang, Mar 08 2013
The recurrence equation a(n+1) = (A*n + B)*a(n) + C*a(n-1) with the initial conditions a(0) = 0, a(1) = 1 has the solution a(n) = Sum_{k = 0..floor((n-1)/2)} C^k*binomial(n-k-1,k)*( Product_{j = 1..n-2k-1} (k+j)*A + B ). This is the case A = 1, B = 1, C = -1. - Peter Bala, Aug 01 2013

Examples

			Continued fraction approximation 1/(1-1/(2-1/(3-1/4))) = 18/7 = a(4)/A058797(4). - _Wolfdieter Lang_, Mar 08 2013
		

Crossrefs

Column 1 of A007754.
Cf. A073888, A073889, A221913 (alternating row sums).

Programs

  • GAP
    a:=[1,2];; for n in [3..25] do a[n]:=n*a[n-1]-a[n-2]; od; Concatenation([0], a); # Muniru A Asiru, Oct 26 2018
    
  • Magma
    [0] cat [n le 2 select n else n*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 22 2016
    
  • Mathematica
    t = {0, 1}; Do[AppendTo[t, n*t[[-1]] - t[[-2]]], {n, 2, 25}]; t (* T. D. Noe, Oct 12 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,b*(n+1)-a}; Transpose[NestList[nxt,{1,0,1},20]] [[2]] (* Harvey P. Dale, Nov 30 2015 *)
  • PARI
    m=30; v=concat([1,2], vector(m-2)); for(n=3, m, v[n] = n*v[n-1]-v[n-2]); concat(0, v) \\ G. C. Greubel, Nov 24 2018
  • Sage
    def A058798(n):
        if n < 3: return n
        return hypergeometric([1/2-n/2, 1-n/2],[2, 1-n, -n], -4)*factorial(n)
    [simplify(A058798(n)) for n in (0..20)] # Peter Luschny, Sep 10 2014
    

Formula

a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*binomial(n-k-1,k)*(n-k)!/(k+1)!. - Peter Bala, Aug 01 2013
a(n) = A058797(n+1) + A058799(n-1). - Henry Bottomley, Feb 28 2001
a(n) = Pi*(BesselY(1, 2)*BesselJ(n+1, 2) - BesselJ(1,2)* BesselY(n+1,2)). See the Abramowitz-Stegun reference given under A103921, p. 361 eq. 9.1.27 (first line with Y, J and z=2) and p. 360, eq. 9.1.16 (Wronskian). - Wolfdieter Lang, Mar 05 2013
Limit_{n->oo} a(n)/n! = BesselJ(1,2) = 0.576724807756873... See a comment on asymptotics under A084950.
a(n) = n!*hypergeometric([1/2-n/2, 1-n/2], [2, 1-n, -n], -4) for n >= 2. - Peter Luschny, Sep 10 2014

Extensions

New description from Amarnath Murthy, Aug 17 2002

A053495 Triangle formed by coefficients of numerator polynomials defined by iterating f(u,v) = 1/u - x*v applied to a list of elements {1,2,3,4,...}.

Original entry on oeis.org

1, 1, -1, -1, 2, -2, 1, -4, 6, -6, -1, 6, -18, 24, -24, 1, -9, 36, -96, 120, -120, -1, 12, -72, 240, -600, 720, -720, 1, -16, 120, -600, 1800, -4320, 5040, -5040, -1, 20, -200, 1200, -5400, 15120, -35280, 40320, -40320, 1, -25, 300, -2400, 12600
Offset: 0

Views

Author

Wouter Meeussen, Jan 27 2001

Keywords

Examples

			1, 1 - x, -1 + 2*x - 2*x^2, 1 - 4*x + 6*x^2 - 6*x^3, ...
		

Crossrefs

Diagonals give A000142, A001563, A001286, A001809, A001754, A001810, A001755, A001811, A001777. Except for first term, row sums give negative of A058307.
Row sums of positive entries give A001053, those of negative entries give -1*A001040.

Programs

  • Mathematica
    CoefficientList[ #, x ]&/@Numerator[ FoldList[ (1/#1-x#2)&, 1, Range[ 12 ] ]//Together ]
    FoldList[(1/#1-x#2)&, 1, Range[4] ]//Together (a simpler version, which shows the rational functions)

Formula

Table[ (-1)^(r+c+1) binomial[Floor[(r+c)/2], Floor[(r-c)/2]] Floor[(r+c+1)/2]! / Floor[(r-c+1)/2]!, {r, 0, 7}, {c, 0, r}]
a[0] := -1; a[1] := 1-x; a[n_] := a[n]= n x a[n-1] + a[n-2] (matches sequence except for a[0]).

A058294 Successive rows of a triangle, the columns of which are generalized Fibonacci sequences S(j).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 7, 10, 7, 3, 1, 1, 4, 13, 30, 43, 30, 13, 4, 1, 1, 5, 21, 68, 157, 225, 157, 68, 21, 5, 1, 1, 6, 31, 130, 421, 972, 1393, 972, 421, 130, 31, 6, 1, 1, 7, 43, 222, 931, 3015, 6961, 9976, 6961, 3015, 931, 222, 43, 7, 1
Offset: 1

Views

Author

Russell Walsmith, Dec 07 2000

Keywords

Comments

From Reinhard Zumkeller, Sep 14 2014: (Start)
T(n,k) = A102473(n,k), k=1..n;
T(n,k) = A102472(n,k-n+1), k=n..2*n-1;
T(n,n) = A001040(n). (End)

Examples

			Triangle begins:
  1;
  1, 1, 1;
  1, 2, 3,  2, 1;
  1, 3, 7, 10, 7, 3, 1;
  ...
		

Crossrefs

A001040, A001053, A058307, A058308, A058309 are columns of this triangle.

Programs

  • Haskell
    a058294 n k = a058294_tabf !! (n-1) !! (k-1)
    a058294_row n = a058294_tabf !! (n-1)
    a058294_tabf = [1] : zipWith (++) xss (map (tail . reverse) xss)
                   where xss = tail a102473_tabl
    -- Reinhard Zumkeller, Sep 14 2014
  • Mathematica
    t[n_, n_] = 1; t[n_, k_] := t[n, k] = If[nJean-François Alcover, Oct 05 2016 *)

Formula

The j-th column S(j) is generated by a(n+1) = (n+j)*a(n) + a(n-1), a(0)=0, a(1)=1.

A102038 a(n+1) = n*a(n) + a(n-1), a(1)=1, a(2)=2.

Original entry on oeis.org

1, 2, 5, 17, 73, 382, 2365, 16937, 137861, 1257686, 12714721, 141119617, 1706150125, 22321071242, 314201147513, 4735338283937, 76079613690505, 1298088771022522, 23441677492095901, 446689961120844641
Offset: 1

Views

Author

Eric Angelini, Feb 12 2005

Keywords

Comments

a(n) = x(n) + y(n) where x(n)/y(n) is the continued fraction [1,2,3,4,...,n].
Using a(n) = x(n) - y(n) instead of a(n) = x(n) + y(n) would give A058307.

Crossrefs

Numerators are in A001040 and denominators in A001053.
Cf. A124428.

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=(n-1)*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Feb 23 2019
  • Magma
    I:=[1,2]; [n le 2 select I[n] else (n-1)*Self(n-1) +Self(n-2): n in [1..30]]; // G. C. Greubel, Feb 23 2019
    
  • Mathematica
    a[1]= 1; a[2]= 2; a[n_]:= a[n] = (n-1)*a[n-1]+a[n-2]; Table[a[n], {n,20}] (* Robert G. Wilson v, Feb 14 2005 *)
    RecurrenceTable[{a[1]==1,a[2]==2,a[n+1]==n*a[n]+a[n-1]},a,{n,20}] (* Harvey P. Dale, Sep 04 2018 *)
  • PARI
    a(n)=sum(k=0,n,k!*binomial((n+k)\2,k)*binomial((n+k+1)\2,k)) \\ Paul D. Hanna, Oct 31 2006
    
  • Sage
    [sum(factorial(k)*binomial(floor((n+k-1)/2), k)*binomial(floor((n+k)/2), k) for k in (0..n)) for n in (1..30)] # G. C. Greubel, Feb 23 2019
    

Formula

a(n) = A001040(n) + A001053(n) for n>1.
From Paul D. Hanna, Oct 31 2006: (Start)
a(n+1) = Sum_{k=0..n} k!*C(floor((n+k)/2),k)*C(floor((n+k+1)/2),k).
a(n+1) = Sum_{k=0..n} k!*A124428(n+k,k). (End)

Extensions

Edited and extended by Robert G. Wilson v, Feb 14 2005

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

Original entry on oeis.org

1, 1, 4, 17, 89, 551, 3946, 32119, 293017, 2962289, 32878196, 397500641, 5200386529, 73202912047, 1103244067234, 17725107987791, 302430079859681, 5461466545462049, 104070294443638612, 2086867355418234289, 43928284758226558681, 968509132036402525271
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2000

Keywords

Crossrefs

See A058307 for the same recurrence with 0,1 inputs. [Wolfdieter Lang, May 19 2010]

Programs

  • Magma
    [n le 2 select 1 else Self(n-2)+Self(n-1)*(n): n in [1..30]]; // Vincenzo Librandi, May 06 2013
  • Maple
    A058279 := proc(n) option remember; if n <= 1 then 1 else A058279(n-2)+(n+1)*A058279(n-1); fi; end;
  • Mathematica
    RecurrenceTable[{a[0] == a[1] == 1, a[n] == a[n-2] + a[n-1] (n+1)}, a, {n, 30}] (* Vincenzo Librandi, May 06 2013 *)

Formula

a(n) is asymptotic to c*n! with c=0.9007... - Benoit Cloitre, Sep 03 2002
Right asymptotic (with offset=0) is a(n) ~ c * (n+1)!, where c = 2*BesselI(1,2)-BesselI(0,2) = 0.9016884069385908593273044... - Vaclav Kotesovec, Jan 05 2013
E.g.f.: 2*Pi*(I*BesselY(3, 2*I)*BesselI(2, 2*sqrt(1-x)) + BesselI(3, 2)*BesselY(2, 2*I*sqrt(1-x)))/(1-x). Such e.g.f. computations were inspired after e-mail exchange with Gary Detlefs. After differentiation and putting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p.360, 9.1.16. [Wolfdieter Lang, May 19 2010]

A058308 a(n) = (n+2)*a(n-1) + a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 4, 21, 130, 931, 7578, 69133, 698908, 7757121, 93784360, 1226953801, 17271137574, 260294017411, 4181975416150, 71353876091961, 1288551745071448, 24553837032449473, 492365292394060908, 10364224977307728541, 228505314793164088810
Offset: 0

Views

Author

N. J. A. Sloane, Dec 09 2000

Keywords

Crossrefs

A column of A058294.
Similar recurrences: A001040, A001053, A058279, A058307, A093858. - Wolfdieter Lang, May 19 2010
Cf. A058798.

Programs

  • Magma
    I:=[1,4]; [0] cat [n le 2 select I[n] else (n+2)*Self(n-1) +Self(n-2): n in [1..30]]; // G. C. Greubel, Nov 24 2018
    
  • Mathematica
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==a[n-2]+(n+2)a[n-1]},a[n], {n,20}] (* Harvey P. Dale, May 21 2011 *)
    FullSimplify[Table[(-4*BesselI[3+n,-2]*BesselK[4,2] + BesselI[3+n,-2]*BesselK[5,2] + 4*BesselI[4,2]*BesselK[3+n,2] + BesselI[5,2]*BesselK[3+n,2]) / (BesselI[5,2]*BesselK[4,2] + BesselI[4,2]*BesselK[5,2]),{n,0,20}]] (* Vaclav Kotesovec, Oct 05 2013 *)
  • PARI
    m=30; v=concat([1,4], vector(m-2)); for(n=3, m, v[n]=(n+2)*v[n-1] +v[n-2]); concat([0], v) \\ G. C. Greubel, Nov 24 2018
    
  • Sage
    def A058308(n):
        if n < 2: return n
        return factorial(n+2)*hypergeometric([1/2-n/2, 1-n/2], [4, -n-2, 1-n], 4)/6
    [round(A058308(n).n(100)) for n in (0..20)] # Peter Luschny, Sep 10 2014
    
  • Sage
    @cached_function
    def A058308(n):
        if n==0: return 0
        if n==1: return 1
        return (n+2)*A058308(n-1) + A058308(n-2)
    [A058308(n) for n in range(30)]  # G. C. Greubel, Nov 24 2018

Formula

E.g.f.: -Pi*(BesselY(4, 2*i)*BesselI(3, 2*sqrt(1-x)) - i*BesselI(4, 2)*BesselY(3, 2*i*sqrt(1-x)))/(1-x)^(3/2). Such e.g.f. computations were the result of an e-mail exchange with Gary Detlefs. After differentiation and setting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p. 360, 9.1.16 and p. 375, 9.63. - Wolfdieter Lang, May 19 2010
a(n) = Sum_{k = 0..floor((n-1)/2)} (n-2*k-1)!*binomial(n-k-1,k)* binomial(n-k+2,k+3). Cf. A058798. - Peter Bala, Aug 01 2013
a(n) = (-4*BesselI(3+n,-2)*BesselK(4,2) + BesselI(3+n,-2)*BesselK(5,2) + 4*BesselI(4,2)*BesselK(3+n,2) + BesselI(5,2)*BesselK(3+n,2)) / (BesselI(5,2)*BesselK(4,2) + BesselI(4,2)*BesselK(5,2)). - Vaclav Kotesovec, Oct 05 2013
a(n) ~ (4*BesselI(4,2) + BesselI(5,2))/(BesselI(5,2)*BesselK(4,2) + BesselI(4,2)*BesselK(5,2)) * sqrt(Pi/2) * n^(n+5/2)/exp(n). - Vaclav Kotesovec, Oct 05 2013
a(n) = (n+2)!*hypergeometric([1/2-n/2,1-n/2],[4,-n-2,1-n],4)/6 for n >= 2. - Peter Luschny, Sep 10 2014
a(n) = (n+1)! [x^(n+1)] (2/(1-x))*(K(3,2)*I(2,2*sqrt(1-x))+I(3,2)*K(2,2*sqrt(1-x))), K and I Bessel functions. - Peter Luschny, May 01 2017

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
Showing 1-10 of 16 results. Next