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.

Showing 1-3 of 3 results.

A068106 Euler's difference table: triangle read by rows, formed by starting with factorial numbers (A000142) and repeatedly taking differences. T(n,n) = n!, T(n,k) = T(n,k+1) - T(n-1,k).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 4, 6, 9, 11, 14, 18, 24, 44, 53, 64, 78, 96, 120, 265, 309, 362, 426, 504, 600, 720, 1854, 2119, 2428, 2790, 3216, 3720, 4320, 5040, 14833, 16687, 18806, 21234, 24024, 27240, 30960, 35280, 40320, 133496, 148329, 165016, 183822, 205056, 229080, 256320, 287280, 322560, 362880
Offset: 0

Views

Author

N. J. A. Sloane, Apr 12 2002

Keywords

Comments

Triangle T(n,k) (n >= 1, 1 <= k <= n) giving number of ways of winning with (n-k+1)st card in the generalized "Game of Thirteen" with n cards.
From Emeric Deutsch, Apr 21 2009: (Start)
T(n-1,k-1) is the number of non-derangements of {1,2,...,n} having largest fixed point equal to k. Example: T(3,1)=3 because we have 1243, 4213, and 3241.
Mirror image of A047920.
(End)

Examples

			Triangle begins:
[0]    1;
[1]    0,    1;
[2]    1,    1,    2;
[3]    2,    3,    4,    6;
[4]    9,   11,   14,   18,   24;
[5]   44,   53,   64,   78,   96,  120;
[6]  265,  309,  362,  426,  504,  600,  720;
[7] 1854, 2119, 2428, 2790, 3216, 3720, 4320, 5040.
		

Crossrefs

Row sums give A002467.
Diagonals give A000142, A001563, A001564, A001565, A001688, A001689, A023043, A023044, A023045, A023046, A023047 (factorials and k-th differences, k=1..10).
See A047920 and A086764 for other versions.
T(2*n, n) is A033815.

Programs

  • Haskell
    a068106 n k = a068106_tabl !! n !! k
    a068106_row n = a068106_tabl !! n
    a068106_tabl = map reverse a047920_tabl
    -- Reinhard Zumkeller, Mar 05 2012
  • Maple
    d[0] := 1: for n to 15 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) if k <= n then sum(binomial(k, j)*d[n-j], j = 0 .. k) else 0 end if end proc: for n from 0 to 9 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form; Emeric Deutsch, Jul 18 2009
  • Mathematica
    t[n_, k_] := Sum[(-1)^j*Binomial[n-k, j]*(n-j)!, {j, 0, n}]; Flatten[ Table[ t[n, k], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, Feb 21 2012, after Philippe Deléham *)
    T[n_, k_] := n! HypergeometricPFQ[{k-n}, {-n}, -1];
    Table[T[n, k], {n,0,9}, {k,0,n}] // Flatten (* Peter Luschny, Oct 05 2017 *)

Formula

T(n, k) = Sum_{j>= 0} (-1)^j*binomial(n-k, j)*(n-j)!. - Philippe Deléham, May 29 2005
From Emeric Deutsch, Jul 18 2009: (Start)
T(n,k) = Sum_{j=0..k} d(n-j)*binomial(k, j), where d(i) = A000166(i) are the derangement numbers.
Sum_{k=0..n} (k+1)*T(n,k) = A000166(n+2) (the derangement numbers). (End)
T(n, k) = n!*hypergeom([k-n], [-n], -1). - Peter Luschny, Oct 05 2017
D-finite recurrence for columns: T(n,k) = n*T(n-1,k) + (n-k)*T(n-2,k). - Georg Fischer, Aug 13 2022

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 01 2003
Edited by N. J. A. Sloane, Sep 24 2011

A116854 First differences of the rows in the triangle of A116853, starting with 0.

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 11, 3, 4, 6, 53, 11, 14, 18, 24, 309, 53, 64, 78, 96, 120, 2119, 309, 362, 426, 504, 600, 720, 16687, 2119, 2428, 2790, 3216, 3720, 4320, 5040, 148329, 16687, 18806, 21234, 24024, 27240, 30960, 35280, 40320, 1468457, 148329, 165016, 183822, 205056, 229080, 256320, 287280, 322560, 362880
Offset: 1

Views

Author

Gary W. Adamson, Feb 24 2006

Keywords

Comments

Row n contains the first differences of row n of A116853, starting with T(n,1) = A116853(n,1) - 0.
As in A116853, 0! = 1 is omitted here. - Georg Fischer, Mar 23 2019

Examples

			First few rows of the triangle are:
[1]    1;
[2]    1,   1;
[3]    3,   1,   2;
[4]   11,   3,   4,   6;
[5]   53,  11,  14,  18,  24;
[6]  309,  53,  64,  78,  96, 120;
[7] 2119, 309, 362, 426, 504, 600, 720;
...
For example, row 4 (11, 3, 4, 6) are first differences along row 4 of A116853: ((0), 11, 14, 18, 24).
		

Crossrefs

Cf. A000142 (row sums), A033815 (central terms), A047920, A068106 (with 0!), A055790 (column k=3), A277609 (k=4), A277563 (k=5), A280425 (k=6).

Programs

  • Haskell
    a116854 n k = a116854_tabl !! (n-1) !! (k-1)
    a116854_row n = a116854_tabl !! (n-1)
    a116854_tabl = [1] : zipWith (:) (tail $ map head tss) tss
                   where tss = a116853_tabl
    -- Reinhard Zumkeller, Aug 31 2014
  • Maple
    A116853 := proc(n,k) option remember ; if n = k then n! ; else procname(n,k+1)-procname(n-1,k) ; end if; end proc:
    A116854 := proc(n,k) if k = 1 then A116853(n,1) ; else A116853(n,k) -A116853(n,k-1) ; end if; end proc:
    seq(seq(A116854(n,k),k=1..n),n=1..15) ; # R. J. Mathar, Mar 27 2010
  • Mathematica
    rows = 10;
    rr = Range[rows]!;
    dd = Table[Differences[rr, n], {n, 0, rows - 1}];
    T = Array[t, {rows, rows}];
    Do[Thread[Evaluate[Diagonal[T, -k+1]] = dd[[k, ;; rows-k+1]]], {k, rows}];
    Table[({0}~Join~Table[t[n, k], {k, 1, n}]) // Differences, {n, 1, rows}] // Flatten (* Jean-François Alcover, Dec 21 2019 *)

Formula

T(n,k) = A116853(n,k) - A116853(n,k-1) if k>1.
T(n,1) = A116853(n,1) = A000255(n-1).
Sum_{k=1..n} T(n,1) = n! = A000142(n).

Extensions

Definition made concrete and sequence extended by R. J. Mathar, Mar 27 2010

A284845 Number of permutations on [n+4] with no circular 4-successions.

Original entry on oeis.org

90, 468, 2982, 22320, 191106, 1838220, 19599822, 229257288, 2917290090, 40107565764, 592302134070, 9349254600288, 157059054215442, 2797498002296700, 52657059745734366, 1044337677676754040, 21765735199891598202, 475573090189331643828, 10870086948032475194310
Offset: 1

Views

Author

Enrique Navarrete, Apr 03 2017

Keywords

Comments

Define a circular k-succession in a permutation p on [n] as either a pair p(i),p(i+1) if p(i+1)=p(i)+k, or as the pair p(n),p(1) if p(1)=p(n)+k. If we let d*(n,k) be the number of permutations on [n] that avoid substrings (j,j+k), 1<=j<=n, k=4, i.e., permutations with no circular 4-succession, then a(n) counts d*(n+4,4).
For example, a(1)=90 since there are 90 permutations in S5 with no circular 4-succession, i.e., permutations that avoid the substring {15} such as 15234 or 53241.

Examples

			a(2)=468 since there are 468 permutations in S6 with no circular 4-succession, i.e., permutations that avoid substrings {15,26} such as 261345 or 653142.
		

Programs

  • Maple
    A284845 := proc(n)
        local j;
        add( (-1)^j*binomial(n,j)*(n-j+3)!,j=0..n) ;
        %*(n+4) ;
    end proc:
    seq(A284845(n),n=1..20) ; # R. J. Mathar, Jul 15 2017
  • Mathematica
    Table[(n + 4) Sum[(-1)^j Binomial[n, j] * (n - j + 3)!, {j, 0, n}], {n,0, 20}] (* or *) Table[(4+n) (3+n)! Hypergeometric1F1[-n,-3-n,-1],{n, 0, 20}] (* Indranil Ghosh, Apr 07 2017 *)

Formula

a(n) = (n+4)* Sum_{j=0..n} (-1)^j*binomial(n,j)*(n-j+3)!.
Conjecture: a(n) = (n+4)*A277609(n+3). - R. J. Mathar, Jul 15 2017
Showing 1-3 of 3 results.