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!)
A121965 a(n) = (n-1)*a(n-1)-a(n-2), a(0)=0, a(1)=1. 1

%I #25 Jul 13 2019 13:32:23

%S 0,1,1,1,2,7,33,191,1304,10241,90865,898409,9791634,116601199,

%T 1506023953,20967734143,313009988192,4987192076929,84469255319601,

%U 1515459403675889,28709259414522290,572669728886769911,11997355047207645841,263369141309681438591

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

%C a(n+1) = A058797(n).

%D Eugene Jahnke and Fritz Emde, Table of Functions with Formulae and Curves, (1945), page 144.

%H Seiichi Manyama, <a href="/A121965/b121965.txt">Table of n, a(n) for n = 0..451</a>

%H Isak Hilmarsson, Ingibjorg Jonsdottir, Steinunn Sigurdardottir and Sigridur Vidarsdottir, <a href="http://hdl.handle.net/1946/9181">Wilf-classification of mesh patterns of short length</a>, Reykjavík University, Thesis, May 2011.

%F a(n) = ( J_n(2)*Y_0(2) - J_0(2)*Y_n(2) )/( J_1(2)* Y_0(2) - J_0(2)*Y_1(2) ) where J and Y are Bessel functions.

%F a(-n) = (-1)^n * a(n). - _Michael Somos_, Jan 28 2014

%F 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_, Jan 28 2014

%F G.f. A(x) =: y satisfies y = x + x^2 * (y' - y) as formal power series. - _Michael Somos_, Jan 28 2014

%F E.g.f. A(x) =: y satisfies 0 = y''' * (y' - y) + y'' * (y' - 2*y''). - _Michael Somos_, Jan 28 2014

%F a(n+1) = Sum_{k=0..n/2} (-1)^k * (n-k)! / k! * binomial(n-k, k) if n>=-1. - _Michael Somos_, Jan 28 2014

%e G.f. = x + x^2 + x^3 + 2*x^4 + 7*x^5 + 33*x^6 + 191*x^7 + 1304*x^8 + ...

%t Needs["DiscreteMath`RSolve`"]; Clear[f]; f[n_Integer] = Module[{a}, a[n] /.RSolve[{a[n] == (n - 1)*a[n - 1] - a[n - 2], a[0] == 0, a[1] == 1},a[n], n][[1]] // Simplify] // ToRadicals Table[Floor[N[f[n]]], {n, 0, 25}]

%t a[ n_] := With[ {m = Abs[n]}, If[ n==0, 0, Sign[n]^m Sum[ (-1)^k (m - k)! / k! Binomial[m - k, k], {k, 0, m/2}]]]; (* _Michael Somos_, Jan 28 2014 *)

%t RecurrenceTable[{a[0]==0,a[1]==1,a[n]==(n-1)a[n-1]-a[n-2]},a,{n,30}] (* _Harvey P. Dale_, Jul 13 2019 *)

%o (PARI) {a(n) = local(s, A); s=sign(n); n=abs(n); if( n>0, A=vector(n,k,1); for(k=4, n, A[k] = (k-1) * A[k-1] - A[k-2]); s^n * A[n], 0)}; /* _Michael Somos_, Jan 28 2014 */

%o (PARI) {a(n) = local(s, a0, a1, a2); s = sign(n); s^n * if( n!=0, a1=1; for( k=2, abs(n), a2 = (k-1) * a1 - a0; a0 = a1; a1 = a2); a1, 0)}; /* _Michael Somos_, Jan 28 2014 */

%o (PARI) {a(n) = local(s, A); s=sign(n); n=abs(n); A = O(x); for(k=1, n, A = (1 + x * A') * x / (1 + x^2)); s^n * polcoeff(A, n)}; /* _Michael Somos_, Jan 28 2014 */

%o (PARI) {a(n) = local(s); if( n==0, 0, s=sign(n); n=abs(n)-1; s^(n+1) * sum(k=0, n\2, (-1)^k * (n-k)! / k! * binomial(n-k, k)))}; /* _Michael Somos_, Jan 28 2014 */

%Y Cf. A007754, A056921 (bisection), A058797, A106174.

%K nonn

%O 0,5

%A _Roger L. Bagula_, Sep 02 2006

%E Values (with rounding errors) and offset corrected by the Assoc. Eds. of the OEIS, Mar 27 2010

%E Added a(0)=0 from _Michael Somos_, Jan 28 2014

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 May 8 03:37 EDT 2024. Contains 372317 sequences. (Running on oeis4.)