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!)
A121354 a(n) = (3*n-1)*a(n-1) - a(n-2). 2

%I #39 May 19 2020 17:32:48

%S 0,1,5,39,424,5897,99825,1990603,45684044,1185794541,34342357645,

%T 1097769650099,38387595395820,1457630855391061,59724477475637681,

%U 2626419378072666903,123381986291939706760,6166472895218912671097,326699681460310431861381,18289015688882165271566239

%N a(n) = (3*n-1)*a(n-1) - a(n-2).

%H Vincenzo Librandi, <a href="/A121354/b121354.txt">Table of n, a(n) for n = 0..200</a>

%H S. Janson, <a href="https://dmtcs.episciences.org/520">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) = Pi* ( J_{n+2/3}(2/3) * Y_{2/3}(2/3) - J_{2/3}(2/3)* Y_{n+2/3}(2/3) )/3 , where J and Y are Bessel functions.

%F a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*3^(n-2*k-1)*(n-2*k-1)!*binomial(n-k-1,k)*binomial(n-k-1/3,k+2/3), cf. A058798. - _Peter Bala_, Aug 01 2013

%F a(n) ~ BesselJ(2/3, 2/3) * sqrt(2*Pi) * 3^(n-1/3) * n^(n+1/6) / exp(n). - _Vaclav Kotesovec_, Jul 31 2014

%F a(n) = 3^(n-1)*Gamma(n+2/3)*hypergeometric([1/2-n/2, 1-n/2], [5/3, 1/3-n, 1-n], -4/9)/Gamma(5/3) for n >= 2. - _Peter Luschny_, Sep 10 2014

%t f[n_Integer] = Module[{a}, a[n] /. RSolve[{a[n] == (3*n - 1)*a[n - 1] - a[n - 2], a[0] == 0, a[1] == 1}, a[n], n][[1]] // FullSimplify] Rationalize[N[Table[f[n], {n, 0, 25}], 100], 0]

%t RecurrenceTable[{a[0]==0,a[1]==1,a[n]==(3n-1)a[n-1]-a[n-2]},a,{n,20}] (* _Harvey P. Dale_, Jul 29 2014 *)

%o (Python)

%o from sympy import cacheit

%o @cacheit

%o def A121354(n):

%o if n <= 1:

%o return n

%o else:

%o return (3*n-1)*A121354(n-1)-A121354(n-2)

%o print([A121354(n) for n in range(20)]) # Oct 14 2009

%o (Sage)

%o def A121354(n):

%o if n < 2: return n

%o return 3^(n-1)*gamma(n+2/3)*hypergeometric([1/2-n/2, 1-n/2], [5/3, 1/3-n, 1-n], -4/9) /gamma(5/3)

%o [round(A121354(n).n(100)) for n in (0..19)] # _Peter Luschny_, Sep 10 2014

%Y Cf. A000153, A001053, A053984, A058798.

%K nonn,easy

%O 0,3

%A _Roger L. Bagula_ and Bob Hanlon (hanlonr(AT)cox.net), Sep 05 2006

%E Offset corrected by the Associate Editors of the OEIS - Oct 14 2009

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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)