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.

A025164 a(n) = a(n-2) + (2n-1)a(n-1); a(0)=1, a(1)=1.

This page as a plain text file.
%I A025164 #74 Jun 04 2025 14:14:34
%S A025164 1,1,4,21,151,1380,15331,200683,3025576,51635475,984099601,
%T A025164 20717727096,477491822809,11958013297321,323343850850476,
%U A025164 9388929687961125,291380164177645351,9624934347550257708,337164082328436665131,12484695980499706867555,487240307321817004499776
%N A025164 a(n) = a(n-2) + (2n-1)a(n-1); a(0)=1, a(1)=1.
%C A025164 Numerators of convergents to coth(1) = 1.313035... = A073747.
%C A025164 Numerator of continued fraction given by C(n) = [ 1; 3, 5, 7, ..., (2n-1)]. - _Amarnath Murthy_, May 02 2001
%C A025164 Equals eigensequence of an infinite lower triangular matrix with (1, 3, 5, ...) in the main diagonal, (1, 1, 1, ...) in the sum diagonal, and the rest zeros. - _Gary W. Adamson_, Apr 17 2009
%C A025164 We can use the defining recurrence to extend the sequence to negative indices to give a(-n) = A036244(n-1). - _Peter Bala_, Sep 11 2014
%H A025164 Alois P. Heinz, <a href="/A025164/b025164.txt">Table of n, a(n) for n = 0..200</a>
%H A025164 S. Janson, <a href="https://doi.org/10.46298/dmtcs.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 A025164 E.g.f.: cosh((1-2*x)^(1/2)-1)/(1-2*x)^(1/2). - _Vladeta Jovovic_, Jan 30 2004
%F A025164 a(n) = round((exp(1)+exp(-1))*(BesselK(n-3/2, 1)+(2*n-1)*BesselK(n-1/2, 1))/sqrt(2*Pi) ). - _Mark van Hoeij_, Jul 02 2010
%F A025164 a(n) ~ sqrt(2)*cosh(1)*(2*n)^n/exp(n). - _Vaclav Kotesovec_, Jan 05 2013
%F A025164 a(n) = A001147(n)*hypergeometric([-n/2+1/2, -n/2], [1/2, -n, 1/2-n], 1) for n >= 1. - _Peter Luschny_, Sep 11 2014
%F A025164 a(n) = Sum_{k = 0..floor(n/2)} binomial(n - k, k)*( Product_{j = 1 .. n - 2*k} (2*k + 2*j - 1) ) = Sum_{k = 0..floor((n+1)/2)} 2^(2*k - n - 1)*(2*n + 2 - 2*k)!/( (n + 1 - 2*k)!*(2*k)! ). - _Peter Bala_, Sep 11 2014
%F A025164 a(n) = -i*( BesselK(1/2, 1)*BesselI(n+1/2, -1) - BesselI(-1/2, -1)*BesselK(n+1/2, 1)) for n>=0 (a(0)=1, a(1) = 1). - _G. C. Greubel_, Apr 21 2015
%F A025164 a(n) = A036244(-1-n) for all n in Z.
%F A025164 0 = a(n)*(-a(n+2)) + a(n+1)*(+a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) if n >= 0. - _Michael Somos_, Jan 10 2017
%F A025164 Given e.g.f. A(x), then 0 = A(x) + 3*A'(x) + (2*x-1)*A''(x). - _Michael Somos_, Jan 10 2017
%F A025164 Given g.f. A(x), then 0 = 1 + (x^2+x-1)*A(x) + 2*x^2*A'(x). - _Michael Somos_, Jan 10 2017
%e A025164 G.f. = 1 + x + 4*x^2 + 21*x^3 + 151*x^4 + 1380*x^5 + 15331*x^6 + ...
%p A025164 a:= proc(n) option remember;
%p A025164       `if`(n<2, 1, a(n-2) +(2*n-1)*a(n-1))
%p A025164     end:
%p A025164 seq(a(n), n=0..25);  # _Alois P. Heinz_, Sep 17 2014
%t A025164 a[ n_ ] := a[n] =a[n-2]+(-1+2 n) a[n-1]; a[0] := 1; a[1] := 1;
%t A025164 RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-2]+(2n-1)a[n-1]},a,{n,20}] (* _Harvey P. Dale_, Mar 25 2012 *)
%t A025164 a[ n_] := Round[ (Exp[1] + Exp[-1]) (BesselK[n - 3/2, 1] + (2 n - 1) BesselK[n - 1/2, 1]) / Sqrt[2 Pi]]; (* _Michael Somos_, Aug 26 2015 (n>=0) *)
%t A025164 a[ n_] := Module[{ y = Sqrt[1 - 2 x]}, n! SeriesCoefficient[ Cosh[y - 1] / y, {x, 0, n}]]; (* _Michael Somos_, Aug 26 2015 (n>=0) *)
%t A025164 a[ n_] := (BesselK[ 1/2, 1] BesselI[ n + 1/2, -1] - BesselI[ -1/2, -1] BesselK[ n + 1/2, 1]) / I // FunctionExpand // Simplify; (* _Michael Somos_, Aug 26 2015 *)
%t A025164 Join[{1}, Convergents[Coth[1], 20] // Numerator] (* _Jean-François Alcover_, Jun 15 2019 *)
%o A025164 (Sage)
%o A025164 def A025164(n):
%o A025164     if n == 0: return 1
%o A025164     return sloane.A001147(n)*hypergeometric([-n/2+1/2, -n/2], [1/2, -n, 1/2-n], 1)
%o A025164 [round(A025164(n).n(100)) for n in (0..20)] # _Peter Luschny_, Sep 11 2014
%o A025164 (Magma) [n le 2 select 1 else (2*n-3)*Self(n-1)+Self(n-2): n in [1..20]]; // _Vincenzo Librandi_, Apr 22 2015
%o A025164 (PARI) a(n)={if(n<2,1,a(n-2)+(2*n-1)*a(n-1))} \\ _Edward Jiang_, Sep 11 2014
%Y A025164 Cf. A001040, A001053, A036244, A058798, A073747.
%K A025164 nonn
%O A025164 0,3
%A A025164 _Wouter Meeussen_
%E A025164 More terms from Larry Reeves (larryr(AT)acm.org), May 15 2001
%E A025164 More terms from _Vladeta Jovovic_, Jan 30 2004