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.

A127070 Define an array by d(m, 0) = 1, d(m, 1) = m; d(m, k) = (m - k + 1) d(m+1, k-1) - (k-1) (m+1) d(m+2, k-2). Sequence gives d(4,n).

Original entry on oeis.org

1, 4, 10, -24, -420, -960, 22680, 201600, -1496880, -36288000, 64864800, 7823692800, 25297272000, -2092278988800, -18988521552000, 690452066304000, 11457025515936000, -277436193914880000, -7430805000755136000, 133809610449715200000, 5500591866494524800000, -76432049488877322240000
Offset: 0

Views

Author

Vincent v.d. Noort, Mar 21 2007

Keywords

References

  • V. van der Noort and N. J. A. Sloane, Paper in preparation, 2007.

Crossrefs

A column of A105937.

Programs

  • Magma
    function T(n, k)
      if k eq 0 then return 1;
      elif k eq 1 then return n;
      else return (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2);
      end if; return T; end function;
    [T(4, n): n in [0..25]]; // G. C. Greubel, Jan 29 2020
    
  • Maple
    T:= proc(n, k) option remember;
          if k=0 then 1
        elif k=1 then n
        else (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2)
          fi; end:
    seq(T(4, n), n=0..25); # G. C. Greubel, Jan 29 2020
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0, 1, If[k==1, n, (n-k+1)*T[n+1, k-1] - (k-1)*(n+1)* T[n+2, k-2]]]; Table[T[4, n], {n,0,25}] (* G. C. Greubel, Jan 29 2020 *)
  • PARI
    T(n, k) = if(k==0, 1, if(k==1, n, (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2) ));
    vector(25, n, T(4, (n-1)) ) \\ G. C. Greubel, Jan 29 2020
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0): return 1
        elif (k==1): return n
        else: return (n-k+1)*T(n+1, k-1) - (k-1)*(n+1)*T(n+2, k-2)
    [T(4, n) for n in (0..25)] # G. C. Greubel, Jan 29 2020