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.

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

Original entry on oeis.org

0, 1, 2, 1, 3, 11, 53, 317, 2216, 17717, 159400, 1593683, 17528297, 210321847, 2734024611, 38274750871, 574103734768, 9185449434441, 156149906360886, 2810660039745077, 53401966651421695, 1068030147578999459, 22428476949252627753, 493423682223518065489
Offset: 0

Views

Author

Roger L. Bagula, Sep 13 2006

Keywords

Crossrefs

Cf. A122022.

Programs

  • GAP
    a:=[0,1,2,1];; for n in [5..30] do a[n]:=(n-2)*a[n-1]-a[n-4]; od; a; # G. C. Greubel, Oct 04 2019
  • Magma
    I:=[0,1,2,1]; [n le 4 select I[n] else (n-2)*Self(n-1) - Self(n-4): n in [1..30]]; // G. C. Greubel, Oct 04 2019
    
  • Maple
    a := proc (n) option remember;
           if n < 3 then n elif n = 3 then 1 else (n-1)*a(n-1)-a(n-4) end if
         end proc:
    seq(a(n), n = 0..30); # G. C. Greubel, Oct 04 2019
  • Mathematica
    a[0]=0; a[1]=1; a[2]=2; a[3]=1; a[n_]:= a[n]= (n-1)*a[n-1] - a[n-4]; Table[a[n], {n, 0, 30}]
    RecurrenceTable[{a[0]==0,a[1]==1,a[2]==2,a[3]==1,a[n]==(n-1)a[n-1]- a[n-4]}, a,{n,0,30}] (* Harvey P. Dale, Jul 16 2016 *)
    CoefficientList[AsymptoticDSolveValue[{(x^4 + 1)*f[x] - x^2*f'[x] + 3*x^3 - x^2 - x == 0, f[1] == 1}, f[x], {x, 0, 20}], x] (* version >=12, Vaclav Kotesovec, Jun 06 2021 *)
  • PARI
    my(m=30, v=concat([0,1,2,1], vector(m-4))); for(n=5, m, v[n] = (n-2)*v[n-1] - v[n-4] ); v \\ G. C. Greubel, Oct 04 2019
    
  • Sage
    def a(n):
        if n<4: return n-1
        elif n==4: return 1
        else: return (n-2)*a(n-1) - a(n-4)
    [a(n) for n in (1..30)] # G. C. Greubel, Oct 04 2019
    

Formula

a(n) ~ c * (n-1)!, where c = 0.438972920465828798175530475000702431170711231072281289641... - Vaclav Kotesovec, Jun 06 2021

Extensions

Offset changed to 0 by Georg Fischer, Jun 06 2021

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

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

Original entry on oeis.org

0, 1, 2, 1, 1, 0, -4, -7, -11, -11, 13, 62, 150, 249, 119, -563, -2363, -5600, -7266, 1179, 38987, 134187, 264975, 242574, -537166, -3355093, -9184543, -14763745, -1871761, 82005564, 320803682, 719424797, 771834105, -1606327251, -11230437711, -33532606418
Offset: 0

Views

Author

Roger L. Bagula, Sep 13 2006

Keywords

Crossrefs

Cf. A122022.

Programs

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

Formula

a(n) = a(n-1) - (n-4)*a(n-4).

Extensions

Terms a(31) onward added by G. C. Greubel, Oct 04 2019
Showing 1-3 of 3 results.