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.

A049061 Triangle a(n,k) (1<=k<=n) of "signed Eulerian numbers" read by rows.

Original entry on oeis.org

1, 1, -1, 1, 0, -1, 1, -1, -1, 1, 1, 2, -6, 2, 1, 1, 1, -8, 8, -1, -1, 1, 8, -19, 0, 19, -8, -1, 1, 7, -27, 19, 19, -27, 7, 1, 1, 22, -32, -86, 190, -86, -32, 22, 1, 1, 21, -54, -54, 276, -276, 54, 54, -21, -1, 1, 52, 27, -648, 1002, 0, -1002, 648, -27, -52, -1, 1, 51, -25
Offset: 1

Views

Author

Keywords

Comments

Identical to rows n=2..n of D(n,k) on page 2 of Tanimoto reference. - Jonathan Vos Post, Dec 11 2006

Examples

			Triangle begins:
  1;
  1, -1;
  1,  0, -1;
  1, -1, -1,  1;
  1,  2, -6,  2,  1;
  ...
		

Crossrefs

Cf. A008292.
Cf. A080856.

Programs

  • Haskell
    a049061 n k = a049061_tabl !! (n-1) !! (k-1)
    a049061_row n = a049061_tabl !! (n-1)
    a049061_tabl = map fst $ iterate t ([1], 1) where
       t (row, k) = (if odd k then us else vs, k + 1) where
         us = zipWith (-) (row ++ [0]) ([0] ++ row)
         vs = zipWith (+) ((zipWith (*) ks row) ++ [0])
                          ([0] ++ (zipWith (*) (reverse ks) row))
              where ks = [1..k]
    -- Reinhard Zumkeller, Jan 30 2013
  • Mathematica
    a[n_ /; EvenQ[n] && n > 0, k_] := a[n, k] = a[n - 1, k] - a[n - 1, k - 1]; a[n_ /; OddQ[n] && n > 0, k_] := a[n, k] = k*a[n - 1, k] + (n - k + 1)*a[n - 1, k - 1]; a[0,]=0; a[1,1]=1; Flatten[Table[a[n,k], {n,12}, {k, n}]] (* _Jean-François Alcover, May 02 2011 *)

Formula

a(2n, k) = a(2n-1, k) - a(2n-1, k-1), a(2n+1, k) = k*a(2n, k) + (2n-k+2)*a(2n, k-1).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 12 2000
ArXiv URL replaced by its non-cached version - R. J. Mathar, Oct 23 2009