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.

A081406 a(n) = (n+1)*a(n-3), a(0)=a(1)=a(2)=1 for n>1.

Original entry on oeis.org

1, 1, 1, 4, 5, 6, 28, 40, 54, 280, 440, 648, 3640, 6160, 9720, 58240, 104720, 174960, 1106560, 2094400, 3674160, 24344320, 48171200, 88179840, 608608000, 1252451200, 2380855680, 17041024000, 36321084800, 71425670400, 528271744000, 1162274713600
Offset: 0

Views

Author

Labos Elemer, Apr 01 2003

Keywords

Examples

			a(3n+2)=A034001[n]; while other subsequences are near(but not equal) to A001669, A000359.
		

Crossrefs

Programs

  • GAP
    a:= function(k)
        if k<3 then return 1;
        elif k<6 then return k+1;
        else return (k+1)*a(k-3);
        fi;
      end;
    List([0..35], n-> a(n) ); # G. C. Greubel, Aug 24 2019
  • Magma
    a:= func< n | n le 2 select 1 else n in [3..5] select n+1 else (n+1)*Self(n-2) >;
    [a(n): n in [0..35]]; // G. C. Greubel, Aug 24 2019
    
  • Mathematica
    f[n_]:= (n+1)*f[n-3]; f[0]=1; f[1]=1; f[2]=1; Table[f[n], {n, 30}]
    RecurrenceTable[{a[0]==a[1]==a[2]==1,a[n]==(n+1)a[n-3]},a,{n,30}] (* Harvey P. Dale, Mar 06 2019 *)
  • PARI
    a(n) = if(n<3, 1, (n+1)*a(n-3) );
    vector(35, n, a(n-1)) \\ G. C. Greubel, Aug 24 2019
    
  • Sage
    def a(n):
        if n<3: return 1
        elif 3<= n <= 5: return n+1
        else: return (n+1)*a(n-3)
    [a(n) for n in (0..35)] # G. C. Greubel, Aug 24 2019
    

Extensions

Corrected and extended by Harvey P. Dale, Mar 06 2019