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.

Showing 1-3 of 3 results.

A122048 a(n) = (n-2)*a(n-2) - a(n-3), with a(0)=0, a(1)=1, a(2)=2.

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 11, 2, 65, 3, 518, -38, 5177, -936, 62162, -17345, 871204, -322337, 13956609, -6350933, 251541299, -134624336, 5037176913, -3078652355, 110952516422, -75846181078, 2665939046483, -2007107043372, 69390261389636, -56857829217527, 1944934425953180
Offset: 0

Views

Author

Roger L. Bagula, Sep 13 2006

Keywords

Crossrefs

Cf. A122021.

Programs

  • GAP
    a:=[0,1,2,1];; for n in [5..35] do a[n]:=(n-3)*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Oct 04 2019
  • Magma
    I:=[0,1,2,1]; [n le 4 select I[n] else (n-3)*Self(n-2) - Self(n-3): n in [1..35]]; // G. C. Greubel, Oct 04 2019
    
  • Maple
    a:= proc (n) option remember;
          if n < 3 then n
        elif n = 3 then 1
        else (n-2)*a(n-2) - a(n-3)
          end if
        end proc:
    seq(a(n), n = 0..35); # G. C. Greubel, Oct 04 2019
  • Mathematica
    a[0]=0; a[1]=1; a[2]=2; a[n_]:= a[n]= (n-2)*a[n-2] - a[n-3]; Table[a[n], {n, 0, 35}]
  • PARI
    my(m=35, v=concat([0,1,2,1], vector(m-4))); for(n=5, m, v[n] = (n-3)*v[n-2] - v[n-3] ); v \\ G. C. Greubel, Oct 04 2019
    
  • Sage
    def a(n):
        if n<3: return n
        elif n==3: return 1
        else: return (n-2)*a(n-2) - a(n-3)
    [a(n) for n in (0..35)] # G. C. Greubel, Oct 04 2019
    

Formula

a(n) = (n-2)*a(n-2) - a(n-3).

Extensions

Offset changed by G. C. Greubel, Oct 04 2019

A122031 a(n) = a(n - 1) + (n - 1)*a(n - 2).

Original entry on oeis.org

1, 2, 3, 7, 16, 44, 124, 388, 1256, 4360, 15664, 59264, 231568, 942736, 3953120, 17151424, 76448224, 350871008, 1650490816, 7966168960, 39325494464, 198648873664, 1024484257408, 5394759478016, 28957897398400
Offset: 0

Views

Author

Roger L. Bagula, Sep 13 2006

Keywords

Comments

Equals the eigensequence of an infinite lower triangular matrix with (1, 1, 1, ...) in the main diagaonal, (1, 1, 2, 3, 4, 5, ...) in the subdiagonal and the rest zeros. - Gary W. Adamson, Apr 13 2009

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 2; a[n_] := a[n] = a[n - 1] + (n - 1)*a[n - 2] Table[a[n], {n, 0, 30}]
    Table[n!*SeriesCoefficient[1/2*Exp[x+x^2/2]*(2-Sqrt[2*E*Pi]*Erf[1/Sqrt[2]]+Sqrt[2*E*Pi]*Erf[(1+x)/Sqrt[2]]),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec after Paul Abbott, Dec 27 2012 *)
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==a[n-1]+(n-1)a[n-2]},a,{n,30}] (* Harvey P. Dale, Feb 21 2015 *)

Formula

E.g.f.: (1/2)*exp(x + x^2/2)*(2 - sqrt(2*exp(1)*Pi)*erf(1/sqrt(2)) + sqrt(2*exp(1)*Pi)*erf((1+x)/sqrt(2))). - Paul Abbott (paul(AT) physics.uwa.edu.au)
a(n) ~ (1/sqrt(2) + sqrt(Pi)/2*exp(1/2) * (1 - erf(1/sqrt(2)))) * n^(n/2)*exp(sqrt(n) - n/2 - 1/4) * (1+7/(24*sqrt(n))). - Vaclav Kotesovec, Dec 27 2012

Extensions

Edited by N. J. A. Sloane, Sep 17 2006
Offset corrected by Vaclav Kotesovec, Dec 27 2012

A122044 a(n) = a(n-2) - (n-3)*a(n-3), with a(0)=0, a(1)=1, a(2)=2.

Original entry on oeis.org

0, 1, 2, 1, 1, -3, -2, -7, 13, 5, 62, -99, 17, -719, 1106, -923, 10453, -16407, 24298, -183655, 303217, -621019, 3792662, -6685359, 16834061, -90123923, 170597318, -494141387, 2423695393, -4929671655, 15765512842, -72793142659, 158725990837, -545758527919, 2415313413266
Offset: 0

Views

Author

Roger L. Bagula, Sep 13 2006

Keywords

Crossrefs

Programs

  • GAP
    a:=[0,1,2];; for n in [4..35] do a[n]:=a[n-2]-(n-4)*a[n-3]; od; a; # G. C. Greubel, Oct 04 2019
  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else Self(n-2) - (n-4)*Self(n-3): n in [1..35]]; // G. C. Greubel, Oct 04 2019
    
  • Maple
    a:= proc(n) option remember;
          if n < 3 then n
        else a(n-2)-(n-3)*a(n-3)
          fi;
        end proc:
    seq(a(n), n = 0..35); # G. C. Greubel, Oct 04 2019
  • Mathematica
    a[0]=0; a[1]=1; a[2]=2; a[n_]:= a[n]= a[n-2] - (n-3)*a[n-3]; Table[a[n], {n, 0, 35}]
  • PARI
    my(m=35, v=concat([0,1,2], vector(m-3))); for(n=4, m, v[n] = v[n-2] - (n-4)*v[n-3] ); v \\ G. C. Greubel, Oct 04 2019
    
  • Sage
    def a(n):
        if n<3: return n
        else: return a(n-2) - (n-3)*a(n-3)
    [a(n) for n in (0..35)] # G. C. Greubel, Oct 04 2019
    

Formula

a(n) = a(n-2) - (n-3)*a(n-3), with a(0)=0, a(1)=1, a(2)=2. - G. C. Greubel, Oct 04 2019

Extensions

Edited by N. J. A. Sloane, Sep 17 2006
More terms from Max Alekseyev, Sep 13 2009
Showing 1-3 of 3 results.