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.

A280920 Seventh column of Euler's difference table in A068106.

Original entry on oeis.org

0, 0, 0, 0, 0, 720, 4320, 30960, 256320, 2399760, 25022880, 287250480, 3597143040, 48773612880, 711607724640, 11113078385520, 184925331414720, 3265974496290960, 61006644910213920, 1201583921745846960, 24885771463659934080, 540624959563046320080, 12291921453805577987040
Offset: 1

Views

Author

Enrique Navarrete, Jan 10 2017

Keywords

Comments

For n >= 7, this is the number of permutations of [n] that avoid substrings j(j+6), 1 <= j <= n-6.

Examples

			a(10)=2399760 since there are 2399760 permutations in S10 that avoid substrings {17,28,39,4(10)}.
		

Crossrefs

Also 720 times A176732.
Cf. A068106.

Programs

  • Mathematica
    Table[Sum[(-1)^j*Binomial[n-6,j]*(n-j)!,{j,0,n-6}],{n,1,23}] (* Indranil Ghosh, Feb 26 2017 *)
  • PARI
    a(n) = sum(j=0, n-6, (-1)^j*binomial(n-6,j)*(n-j)!); \\ Michel Marcus, Feb 26 2017
  • Python
    f=math.factorial
    def C(n,r):return f(n)/f(r)/f(n-r)
    def A280920(n):
        s=0
        for j in range(0,n-5):
            s+=(-1)**j*C(n-6,j)*f(n-j)
        return s # Indranil Ghosh, Feb 26 2017
    

Formula

For n>=7: a(n) = Sum_{j=0..n-6} (-1)^j*binomial(n-6,j)*(n-j)!.
Note a(n)/n! ~ 1/e.