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
0, 1, 1, 1, 2, 7, 33, 191, 1304, 10241, 90865, 898409, 9791634, 116601199, 1506023953, 20967734143, 313009988192, 4987192076929, 84469255319601, 1515459403675889, 28709259414522290, 572669728886769911, 11997355047207645841, 263369141309681438591 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
a(n+1) = A058797(n).
REFERENCES
Eugene Jahnke and Fritz Emde, Table of Functions with Formulae and Curves, (1945), page 144.
LINKS
Isak Hilmarsson, Ingibjorg Jonsdottir, Steinunn Sigurdardottir and Sigridur Vidarsdottir, Wilf-classification of mesh patterns of short length, Reykjavík University, Thesis, May 2011.
FORMULA
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.
a(-n) = (-1)^n * a(n). - Michael Somos, Jan 28 2014
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
G.f. A(x) =: y satisfies y = x + x^2 * (y' - y) as formal power series. - Michael Somos, Jan 28 2014
E.g.f. A(x) =: y satisfies 0 = y''' * (y' - y) + y'' * (y' - 2*y''). - Michael Somos, Jan 28 2014
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
EXAMPLE
G.f. = x + x^2 + x^3 + 2*x^4 + 7*x^5 + 33*x^6 + 191*x^7 + 1304*x^8 + ...
MATHEMATICA
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}]
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 *)
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 *)
PROG
(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 */
(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 */
(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 */
(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 */
CROSSREFS
Cf. A007754, A056921 (bisection), A058797, A106174.
Sequence in context: A299043 A104981 A058797 * A337058 A006595 A179525
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 02 2006
EXTENSIONS
Values (with rounding errors) and offset corrected by the Assoc. Eds. of the OEIS, Mar 27 2010
Added a(0)=0 from Michael Somos, Jan 28 2014
STATUS
approved

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)