OFFSET
0,6
COMMENTS
Quintic factorial sequences are generated by single 5-order recursion and appear in unified form.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
EXAMPLE
MATHEMATICA
a[0]=a[1]=a[2]=a[3]=a[4]=1; a[x_]:= (x+1)*a[x-5]; Table[a[n], {n, 40}]
PROG
(Haskell)
a081407 n = a081408_list !! n
a081407_list = 1 : 1 : 1 : 1 : zipWith (*) [5..] a081407_list
-- Reinhard Zumkeller, Jan 05 2012
(PARI) m=30; v=concat([1, 1, 1, 1, 1], vector(m-5)); for(n=6, m, v[n]=n*v[n-5] ); v \\ G. C. Greubel, Aug 15 2019
(Magma) [n le 5 select 1 else n*Self(n-5): n in [1..40]]; // G. C. Greubel, Aug 15 2019
(Sage) def a(n):
if (n<5): return 1
else: return (n+1)*a(n-5)
[a(n) for n in (0..40)] # G. C. Greubel, Aug 15 2019
(GAP) a:=[1, 1, 1, 1, 1];; for n in [6..40] do a[n]:=n*a[n-5]; od; a; # G. C. Greubel, Aug 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 01 2003
STATUS
approved