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
G.f. = x + x^2 + 3*x^3 + 10*x^4 + 43*x^5 + 225*x^6 + 1393*x^7 + 9976*x^8 + ...
- 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).
- Alois P. Heinz, Table of n, a(n) for n = 0..450 (first 101 terms from T. D. Noe)
- C. Cannings, The Stationary Distributions of a Class of Markov Chains, Applied Mathematics, Vol. 4 No. 5, 2013, pp. 769-773. doi: 10.4236/am.2013.45105. See Table 1.
- T. Doslic and R. Sharafdini, Hosoya index of splices, bridges and necklaces, Research Gate, 2015.
- Tomislav Doslic and R. Sharafdini, Hosoya Index of Splices, Bridges, and Necklaces, in Distance, Symmetry, and Topology in Carbon Nanomaterials, 2016, pp 147-156. Part of the Carbon Materials: Chemistry and Physics book series (CMCP, volume 9), doi:10.1007/978-3-319-31584-3_10.
- R. K. Guy, Letters to N. J. A. Sloane, June-August 1968
- S. Janson, A divergent generating function that can be summed and analysed analytically, Discrete Mathematics and Theoretical Computer Science; 2010, Vol. 12, No. 2, 1-22.
- N. J. A. Sloane, Transforms
- Eric Weisstein's World of Mathematics, Continued Fraction Constants
- Eric Weisstein's World of Mathematics, Generalized Continued Fraction
-
a001040 n = a001040_list !! n
a001040_list = 0 : 1 : zipWith (+)
a001040_list (zipWith (*) [1..] $ tail a001040_list)
-- Reinhard Zumkeller, Mar 05 2013
-
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
-
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
-
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 *)
-
{a(n) = contfracpnqn( vector(abs(n), i, i))[1, 2]}; /* Michael Somos, Sep 25 2005 */
-
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
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
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
- 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).
- T. D. Noe, Table of n, a(n) for n = 0..100
- E. Barcucci, A. Del Lungo and R. Pinzani, "Deco" polyominoes, permutations and random generation, Theoretical Computer Science, 159, 1996, 29-42.
- S. B. Ekhad, Problem 10356, Amer. Math. Monthly, 101 (1994), 75. [From _N. J. A. Sloane_, Jan 29 2009]
- N. J. A. Sloane, Transforms
- Eric Weisstein's World of Mathematics, Continued Fraction Constants
- Eric Weisstein's World of Mathematics, Generalized Continued Fraction
The square roots of the terms of
A144656.
-
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
-
a001053 n = a001053_list !! n
a001053_list = 1 : 0 :
zipWith (+) a001053_list (zipWith (*) [1..] $ tail a001053_list)
-- Reinhard Zumkeller, Nov 02 2011
-
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
-
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
-
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 *)
-
{a(n) = contfracpnqn(vector(abs(n), i, i))[2, 2]}; /* Michael Somos, Sep 25 2005 */
-
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
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
-
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
-
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 *)
-
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
-
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
-
@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
A093858
a(0) = 1, a(1)= 2, a(n) = (a(n+1) - a(n-1))/n, or a(n+1) = n*a(n) + a(n-1).
Original entry on oeis.org
1, 2, 3, 8, 27, 116, 607, 3758, 26913, 219062, 1998471, 20203772, 224239963, 2711083328, 35468323227, 499267608506, 7524482450817, 120890986821578, 2062671258417643, 37248973638339152, 709793170386861531
Offset: 0
-
a = 1; b = 2; Print[a]; Print[b]; Do[c = n*b + a; Print[c]; a = b; b = c, {n, 1, 30}] (* Ryan Propper, Sep 14 2005 *)
nxt[{n_,a_,b_}]:={n+1,b,b*n+a}; NestList[nxt,{1,1,2},20][[;;,2]] (* Harvey P. Dale, Dec 23 2023 *)
A228340
Triangle read by rows: T(n,k) = (n-1)*T(n-1,k) + T(n-2,k), with T(n,n-1)=1, T(n,n-2)=n-2, for n >= 1, 0 <= k <= n-1.
Original entry on oeis.org
1, 0, 1, 1, 1, 1, 3, 4, 2, 1, 13, 17, 9, 3, 1, 68, 89, 47, 16, 4, 1, 421, 551, 291, 99, 25, 5, 1, 3015, 3946, 2084, 709, 179, 36, 6, 1, 24541, 32119, 16963, 5771, 1457, 293, 49, 7, 1, 223884, 293017, 154751, 52648, 13292, 2673, 447, 64, 8, 1
Offset: 1
Triangle begins:
1,
0,1,
1,1,1,
3,4,2,1,
13,17,9,3,1,
68,89,47,16,4,1,
421,551,291,99,25,5,1,
3015,3946,2084,709,179,36,6,1,
...
-
a228340 n k = a228340_tabl !! (n-1) !! k
a228340_row n = a228340_tabl !! (n-1)
a228340_tabl = map (reverse . fst) $ iterate f ([1], [1,0]) where
f (us, vs'@( : vs@(v : ))) = (vs', ws) where
ws = 1 : (v + 1) : zipWith (+) us (map (* (v + 2)) vs)
-- Reinhard Zumkeller, Aug 31 2013
A228341
Third diagonal (T(n,2)) of triangle in A228340.
Original entry on oeis.org
1, 2, 9, 47, 291, 2084, 16963, 154751, 1564473, 17363954, 209931921, 2746478927, 38660636899, 582656032412, 9361157155491, 159722327675759, 2884363055319153, 54962620378739666, 1102136770630112473, 23199834803611101599
Offset: 2
-
Table[FullSimplify[-2*BesselI[1+n,-2] * (BesselK[2,2] + BesselK[3,2]) + 2*(BesselI[2,2] - BesselI[3,2]) * BesselK[1+n,2]],{n,2,20}] (* Vaclav Kotesovec, Feb 14 2014 *)
-
v = [1, 2]; for(n=4, 21, v = concat(v, n*v[n-2] + v[n-3])); v \\ Rick L. Shepherd, Jan 22 2014
Showing 1-6 of 6 results.
Comments