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.

A081405 a(n) = (n+1)*a(n-2) with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 3, 4, 15, 24, 105, 192, 945, 1920, 10395, 23040, 135135, 322560, 2027025, 5160960, 34459425, 92897280, 654729075, 1857945600, 13749310575, 40874803200, 316234143225, 980995276800, 7905853580625, 25505877196800, 213458046676875
Offset: 0

Views

Author

Labos Elemer, Apr 01 2003

Keywords

Comments

A001147 and A002866 combined.

Examples

			G.f. = 1 + x + 3*x^2 + 4*x^3 + 15*x^4 + 24*x^5 + 105*x^6 + 192*x^7 + ...
		

Crossrefs

Programs

  • GAP
    a:= function(n)
        if n<2 then return 1;
        else return (n+1)*a(n-2);
        fi;
      end;
    List([0..30], n-> a(n) ); # G. C. Greubel, Aug 24 2019
  • Magma
    [n le 1 select 1 else (n+1)*Self(n-1): n in [0..30]]; // Vincenzo Librandi, Oct 26 2014
    
  • Maple
    a[0]:=1:a[1]:=1:for n from 2 to 50 do a[n]:=(a[n-2]*(n+1)^2) od: seq(sqrt(a[n]), n=0..26); # Zerinvary Lajos, Mar 04 2008
  • Mathematica
    f[n_]:= (n+1)*f[n-2]; f[0] = 1; f[1] = 1; Table[f[n], {n, 1, 30}]
    a[ n_]:= If[ n < 0, 0, If[OddQ[n], 2^((n-1)/2) ((n+1)/2)!, (n+1)!!]]; (* Michael Somos, Jan 24 2014 *)
    RecurrenceTable[{a[0]==a[1]==1,a[n]==(n+1)a[n-2]},a,{n,30}] (* Harvey P. Dale, Nov 05 2021 *)
  • PARI
    {a(n) = if( n<2, n>=0, (n+1) * a(n-2))}; /* Michael Somos, Jan 24 2014 */
    
  • PARI
    {a(n) = if( n<0, 0, if( n%2, 2^(n\2) * (n\2 + 1)!, (n+1)! / (2^(n\2) * (n\2)!)))}; /* Michael Somos, Jan 24 2014 */
    
  • Sage
    def a(n):
        if n<2: return 1
        else: return (n+1)*a(n-2)
    [a(n) for n in (0..30)] # G. C. Greubel, Aug 24 2019
    

Formula

a(0)=a(1)=1; a(2n) = A001147(2*n-2) odd terms, double factorial numbers; a(2n-1) = A002866(n) = 2^(n-1)*n!
0 = a(n)*(a(n+1) - a(n+3)) + a(n+1)*a(n+2) if n>=0. - Michael Somos, Jan 24 2014
a(n) = (n-1)-st term of column 1 of the array at A249159, for n >= 0. - Clark Kimberling, Oct 23 2014