login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122050 a(n) = (n-1)*a(n-1) - a(n-4) with a(0)=0, a(1)=1, a(2)=2, a(3)=1. 3
0, 1, 2, 1, 3, 11, 53, 317, 2216, 17717, 159400, 1593683, 17528297, 210321847, 2734024611, 38274750871, 574103734768, 9185449434441, 156149906360886, 2810660039745077, 53401966651421695, 1068030147578999459, 22428476949252627753, 493423682223518065489 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..449 [Offset adapted by Georg Fischer, Jun 06 2021]
FORMULA
a(n) ~ c * (n-1)!, where c = 0.438972920465828798175530475000702431170711231072281289641... - Vaclav Kotesovec, Jun 06 2021
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 *)
PROG
(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
(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
(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
(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
CROSSREFS
Cf. A122022.
Sequence in context: A036448 A369242 A187111 * A081323 A173958 A175243
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Sep 13 2006
EXTENSIONS
Offset changed to 0 by Georg Fischer, Jun 06 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)