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.

A081407 4th-order non-linear ("factorial") recursion: a(0)=a(1)=a(2)=a(3)=1, a(n) = (n+1)*a(n-4).

Original entry on oeis.org

1, 1, 1, 1, 5, 6, 7, 8, 45, 60, 77, 96, 585, 840, 1155, 1536, 9945, 15120, 21945, 30720, 208845, 332640, 504735, 737280, 5221125, 8648640, 13627845, 20643840, 151412625, 259459200, 422463195, 660602880, 4996616625, 8821612800
Offset: 0

Views

Author

Labos Elemer, Apr 01 2003

Keywords

Examples

			Following sequences are interleaved: A007696: {5,45,585,..}; A000404: {6,60,840,..} A034176: {7,77,1155,..}; A034177: {8,96,1536,..}
		

Crossrefs

Programs

  • GAP
    a:= function(k)
        if k<4 then return 1;
        elif k<7 then return k+1;
        else return (k+1)*a(k-4);
        fi;
      end;
    List([0..35], n-> a(n) ); # G. C. Greubel, Aug 24 2019
  • Haskell
    a081407 n = a081408_list !! n
    a081407_list = 1 : 1 : 1 : 1 : zipWith (*) [5..] a081407_list
    -- Reinhard Zumkeller, Jan 05 2012
    
  • Magma
    a:= func< n | n le 3 select 1 else n in [4..6] select n+1 else (n+1)*Self(n-3) >;
    [a(n): n in [0..35]]; // G. C. Greubel, Aug 24 2019
    
  • Mathematica
    f[n_]:= (n+1)*f[n-4]; f[0]=1; f[1]=1; f[2]=1; f[3]=1; Table[f[n], {n, 0, 40}]
    nxt[{n_,a_,b_,c_,d_}]:={n+1,b,c,d,a(n+2)}; NestList[nxt,{3,1,1,1,1},40][[;;,2]] (* Harvey P. Dale, Jan 13 2025 *)
  • PARI
    a(n) = if(n<4, 1, (n+1)*a(n-4) );
    vector(35, n, a(n-1)) \\ G. C. Greubel, Aug 24 2019
    
  • Sage
    def a(n):
        if n<4: return 1
        elif 4<= n <= 6: return n+1
        else: return (n+1)*a(n-4)
    [a(n) for n in (0..35)] # G. C. Greubel, Aug 24 2019