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.

A009551 Expansion of sin(x)/(1-x).

Original entry on oeis.org

0, 1, 2, 5, 20, 101, 606, 4241, 33928, 305353, 3053530, 33588829, 403065948, 5239857325, 73358002550, 1100370038249, 17605920611984, 299300650403729, 5387411707267122, 102360822438075317, 2047216448761506340
Offset: 0

Views

Author

Keywords

Comments

a(n) equals the imaginary part of the permanent of the n X n matrix with (1+i)'s along the main diagonal, and 1's everywhere else. - John M. Campbell, Jul 10 2011

Crossrefs

Cf. A009102, A000142, A000166, A000522, A000023, A053486, A010844 (incomplete Gamma function values at other points).

Programs

  • Magma
    I:=[1,2,5]; [0] cat [n le 3 select I[n] else n*Self(n-1)-Self(n-2)+(n-2)*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 19 2018
  • Maple
    restart: G(x):=sin(x)/(1-x): f[0]:=G(x): for n from 1 to 21 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..20); # Zerinvary Lajos, Apr 03 2009
  • Mathematica
    Table[n!*SeriesCoefficient[Sin[x]/(1-x),{x,0,n}],{n,0,20}] (* corrected by Vaclav Kotesovec, Oct 07 2012 *)
    With[{nn=30},CoefficientList[Series[Sin[x]/(1-x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Apr 17 2013 *)
    Round@Table[Im[Gamma[n+1, I] E^I], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 27 2015 *)
  • PARI
    a(n) = round(n!*sin(1))
    

Formula

a(n) = round(n!*sin(1)), n>=1. - Vladeta Jovovic, Aug 11 2002
a(n) = n! * Sum_{k=0..floor(n/2)} (-1)^k/(2k-1)!, n>0. - Ralf Stephan, Apr 16 2004
a(n) = n*a(n-1) - a(n-2) +(n-2)*a(n-3). - Vaclav Kotesovec, Oct 07 2012
From Vladimir Reshetnikov, Oct 27 2015: (Start)
a(n) = Im(i^n*hypergeom([1,-n], [], i)).
a(n) = n!*sin(1)-cos(Pi*n/2)*hypergeom([1], [n/2+1,(n+3)/2], -1/4)/(n+1) + sin(Pi*n/2)*hypergeom([1], [n/2+2,(n+3)/2], -1/4)/(n^2+3*n+2).
a(n) = Im(Gamma(n+1, i)*exp(i)) = (Gamma(n+1, i)*exp(i)-Gamma(n+1, -i)*exp(-i))/(2*i), where Gamma(a, x) is the upper incomplete Gamma function, i=sqrt(-1).
Gamma(n+1, i) = exp(-i)*((-1)^n*A009102(n) + a(n)*i). (End)

Extensions

More terms from Benoit Cloitre, Aug 13 2002