login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058798 a(n) = n*a(n-1) - a(n-2) with a(0) = 0, a(1) = 1. 28

%I #66 Apr 29 2023 00:06:49

%S 0,1,2,5,18,85,492,3359,26380,234061,2314230,25222469,300355398,

%T 3879397705,54011212472,806288789375,12846609417528,217586071308601,

%U 3903702674137290,73952764737299909,1475151592071860890

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

%C 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

%C a(n) = log_2(A073888(n)) = log_3(A073889(n)).

%C 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

%C a(n) = A221913(n,-1), n>=1, is the numerator sequence of the n-th approximation of the continued fraction -(0 + K_{k=1)^infty(-1/k)) = 1/(1-1/(2-1/(3-1/(4-... The corresponding denominator sequence is A058797(n). - _Wolfdieter Lang_, Mar 08 2013

%C 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

%H Seiichi Manyama, <a href="/A058798/b058798.txt">Table of n, a(n) for n = 0..449</a>

%H S. Janson, <a href="https://hal.inria.fr/hal-00990430">A divergent generating function that can be summed and analysed analytically</a>, Discrete Mathematics and Theoretical Computer Science; 2010, Vol. 12, No. 2, 1-22.

%F 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

%F a(n) = A058797(n+1) + A058799(n-1). - _Henry Bottomley_, Feb 28 2001

%F 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

%F Limit_{n->oo} a(n)/n! = BesselJ(1,2) = 0.576724807756873... See a comment on asymptotics under A084950.

%F a(n) = n!*hypergeometric([1/2-n/2, 1-n/2], [2, 1-n, -n], -4) for n >= 2. - _Peter Luschny_, Sep 10 2014

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

%t t = {0, 1}; Do[AppendTo[t, n*t[[-1]] - t[[-2]]], {n, 2, 25}]; t (* _T. D. Noe_, Oct 12 2012 *)

%t 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 *)

%o (Sage)

%o def A058798(n):

%o if n < 3: return n

%o return hypergeometric([1/2-n/2, 1-n/2],[2, 1-n, -n], -4)*factorial(n)

%o [simplify(A058798(n)) for n in (0..20)] # _Peter Luschny_, Sep 10 2014

%o (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

%o (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

%o (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

%Y Column 1 of A007754.

%Y Cf. A073888, A073889, A221913 (alternating row sums).

%Y Other recurrences of this type: A001040, A036242, A036244, A053983, A053984, A053987, A058307, A058308, A058309, A058797, A058799, A075374, A106174, A121323, A121351, A121353, A121354, A222468, A222470.

%Y Similar sequences: A000806, A001053, A007754, A025164, A093986, A159927, A222467, A222469.

%K nonn,easy

%O 0,3

%A _Christian G. Bower_, Dec 02 2000

%E New description from _Amarnath Murthy_, Aug 17 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 1 19:22 EDT 2024. Contains 373939 sequences. (Running on oeis4.)