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.

A154030 Sequence defined by a(2*n) = 2*(n^2 + 2*n) and a(2*n-1) = (2*n)!/n!.

Original entry on oeis.org

0, 2, 6, 12, 16, 120, 30, 1680, 48, 30240, 70, 665280, 96, 17297280, 126, 518918400, 160, 17643225600, 198, 670442572800, 240, 28158588057600, 286, 1295295050649600, 336, 64764752532480000, 390, 3497296636753920000, 448
Offset: 0

Views

Author

Roger L. Bagula, Jan 04 2009

Keywords

Crossrefs

Programs

  • Magma
    [ n mod 2 eq 0 select 2*((n/2)^2 + n) else Round(Factorial(n+1)/Gamma((n+3)/2)): n in [0..30]]; // G. C. Greubel, Feb 08 2021
  • Mathematica
    Flatten[Table[{2*(n^2 - 1), (2*n)!/n!}, {n, 1, 20}]]
    Table[If[EvenQ[n], 2*((n/2)^2 + n), (n+1)!/((n+1)/2)!], {n, 0, 30}] (* G. C. Greubel, Feb 08 2021 *)
  • PARI
    a(n)=if(n%2, (n+1)!/((n+1)/2)!, 2*(n/2)^2 + 2*n) \\ Charles R Greathouse IV, Sep 01 2016
    
  • Sage
    def A154030(n):
        if (n%2==0): return 2*((n/2)^2 + n)
        else: return factorial(n+1)/factorial((n+1)/2)
    [A154030(n) for n in (0..30)] # G. C. Greubel, Feb 08 2021
    

Formula

a(2*n) = 2*(n^2 + 2*n).
a(2*n-1) = (2*n)!/n!.

Extensions

Edited by G. C. Greubel, Feb 08 2021