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-10 of 13 results. Next

A047920 Triangular array formed from successive differences of factorial numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of permutations of 1,2,...,k,n+1,n+2,...,2n-k that have no agreements with 1,...,n. For example, consider 1234 and 1256, then n=4 and k=2, so T(4,2)=14. Compare A000255 for the case k=1. - Jon Perry, Jan 23 2004
From Emeric Deutsch, Apr 21 2009: (Start)
T(n-1,k-1) is the number of non-derangements of {1,2,...,n} having smallest fixed point equal to k. Example: T(3,1)=4 because we have 4213, 4231, 3214, and 3241 (the permutations of {1,2,3,4} having smallest fixed equal to 2).
Row sums give the number of non-derangement permutations of {1,2,...,n} (A002467).
Mirror image of A068106.
Closely related to A134830, where each row has an extra term (see the Charalambides reference).
(End)
T(n,k) is the number of permutations of {1..n} that don't fix the points 1..k. - Robert FERREOL, Aug 04 2016

Examples

			Triangle begins:
    1;
    1,  0;
    2,  1,  1;
    6,  4,  3,  2;
   24, 18, 14, 11,  9;
  120, 96, 78, 64, 53, 44;
  ...
The left-hand column is the factorial numbers (A000142). The other numbers in the row are calculated by subtracting the numbers in the previous row. For example, row 4 is 6, 4, 3, 2, so row 5 is 4! = 24, 24 - 6 = 18, 18 - 4 = 14, 14 - 3 = 11, 11 - 2 = 9. - _Michael B. Porter_, Aug 05 2016
		

References

  • Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, p. 176, Table 5.3. [From Emeric Deutsch, Apr 21 2009]

Crossrefs

Columns give A000142, A001563, A001564, etc. Cf. A047922.
See A068106 for another version of this triangle.
Orthogonal columns: A000166, A000255, A055790. Main diagonal A033815.
Cf. A002467, A068106, A134830. - Emeric Deutsch, Apr 21 2009
Cf. A155521.
T(n+2,n) = 2*A000153(n+1). T(n+3,n) = 6*A000261(n+2). T(n+4,n) = 24*A001909(n+3). T(n+5, n) = 120*A001910(n+4). T(n+6,n) = 720*A176732(n).
T(n+7,n) = 5040*A176733(n) - Richard R. Forberg, Dec 29 2013

Programs

  • Haskell
    a047920 n k = a047920_tabl !! n !! k
    a047920_row n = a047920_tabl !! n
    a047920_tabl = map fst $ iterate e ([1], 1) where
       e (row, n) = (scanl (-) (n * head row) row, n + 1)
    -- 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(n-k, j)*d[n-j], j = 0 .. n-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 17 2009
    # second Maple program:
    T:= proc(n, k) option remember;
         `if`(k=0, n!, T(n, k-1)-T(n-1, k-1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Sep 01 2021
  • Mathematica
    t[n_, k_] = Sum[(-1)^j*Binomial[k, j]*(n-j)!, {j, 0, n}]; Flatten[Table[t[n, k], {n, 0, 9}, {k, 0, n}]][[1 ;; 47]] (* Jean-François Alcover, May 17 2011, after Philippe Deléham *)
    T[n_, k_] := n! Hypergeometric1F1[-k, -n, -1];
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten  (* Peter Luschny, Jul 28 2024 *)
  • PARI
    row(n) = vector(n+1, k, k--; sum(j=0, n, (-1)^j * binomial(k, j)*(n-j)!)); \\ Michel Marcus, Sep 04 2021

Formula

t(n, k) = t(n, k-1) - t(n-1, k-1) = t(n, k+1) - t(n-1, k) = n*t(n-1, k) + k*t(n-2, k-1) = (n-1)*t(n-1, k-1) + (k-1)*t(n-2, k-2) = A060475(n, k)*(n-k)!. - Henry Bottomley, Mar 16 2001
T(n, k) = Sum_{j>=0} (-1)^j * binomial(k, j)*(n-j)!. - Philippe Deléham, May 29 2005
T(n,k) = Sum_{j=0..n-k} d(n-j)*binomial(n-k,j), where d(i)=A000166(i) are the derangement numbers. - Emeric Deutsch, Jul 17 2009
Sum_{k=0..n} (k+1)*T(n,k) = A155521(n+1). - Emeric Deutsch, Jul 18 2009
T(n, k) = n!*hypergeom([-k], [-n], -1). - Peter Luschny, Jul 28 2024

A002119 Bessel polynomial y_n(-2).

Original entry on oeis.org

1, -1, 7, -71, 1001, -18089, 398959, -10391023, 312129649, -10622799089, 403978495031, -16977719590391, 781379079653017, -39085931702241241, 2111421691000680031, -122501544009741683039, 7597207150294985028449, -501538173463478753560673
Offset: 0

Views

Author

Keywords

Comments

Absolute values give denominators of successive convergents to e using continued fraction 1+2/(1+1/(6+1/(10+1/(14+1/(18+1/(22+1/26...)))))).
Absolute values give number of different arrangements of nonnegative integers on a set of n 6-sided dice such that the dice can add to any integer from 0 to 6^n-1. For example when n=2, there are 7 arrangements that can result in any total from 0 to 35. Cf. A273013. The number of sides on the dice only needs to be the product of two distinct primes, of which 6 is the first example. - Elliott Line, Jun 10 2016
Absolute values give number of Krasner factorizations of (x^(6^n)-1)/(x-1) into n polynomials p_i(x), i=1,2,...,n, satisfying p_i(1)=6. In these expressions 6 can be replaced with any product of two distinct primes (Krasner and Ranulac, 1937). - William P. Orrick, Jan 18 2023
Absolute values give number of pairs (s, b) where s is a covering of the 1 X 2n grid with 1 X 2 dimers and equal numbers of red and blue 1 X 1 monomers and b is a bijection between the red monomers and the blue monomers that does not map adjacent monomers to each other. Ilya Gutkovskiy's formula counts such pairs by an inclusion-exclusion argument. The correspondence with Elliott Line's dice problem is that a dimer corresponds to a die containing an arithmetic progression of length 6 and a pair (r, b(r)), where r is a red monomer and b(r) its image under b, corresponds to a die containing the sum of an arithmetic progression of length 2 and an arithmetic progression of length 3. - William P. Orrick, Jan 19 2023

Examples

			Example from _William P. Orrick_, Jan 19 2023: (Start)
For n=2 the Bessel polynomial is y_2(x) = 1 + 3x + 3x^2 which satisfies y_2(-2) = -7.
The |a(2)|=7 dice pairs are
  {{0,1,2,3,4,5}, {0,6,12,18,24,30}},
  {{0,1,2,18,19,20}, {0,3,6,9,12,15}},
  {{0,1,2,9,10,11}, {0,3,6,18,21,24}},
  {{0,1,6,7,12,13}, {0,2,4,18,20,22}},
  {{0,1,12,13,24,25}, {0,2,4,6,8,10}},
  {{0,1,2,6,7,8}, {0,3,12,15,24,27}},
  {{0,1,4,5,8,9}, {0,2,12,14,24,26}}.
The corresponding Krasner factorizations of (x^36-1)/(x-1) are
  {(x^6-1)/(x-1), (x^36-1)/(x^6-1)},
  {((x^36-1)/(x^18-1))*((x^3-1)/(x-1)), (x^18-1)/(x^3-1)},
  {((x^18-1)/(x^9-1))*((x^3-1)/(x-1)), ((x^36-1)/(x^18-1))*((x^9-1)/(x^3-1))},
  {((x^18-1)/(x^6-1))*((x^2-1)/(x-1)), ((x^36-1)/(x^18-1))*((x^6-1)/(x^2-1))},
  {((x^36-1)/(x^12-1))*((x^2-1)/(x-1)), (x^12-1)/(x^2-1)},
  {((x^12-1)/(x^6-1))*((x^3-1)/(x-1)), ((x^36-1)/(x^12-1))*((x^6-1)/(x^3-1))},
  {((x^12-1)/(x^4-1))*((x^2-1)/(x-1)), ((x^36-1)/(x^12-1))*((x^4-1)/(x^2-1))}.
The corresponding monomer-dimer configurations, with dimers, red monomers, and blue monomers represented by the symbols '=', 'R', and 'B', and bijections between red and blue monomers given as sets of ordered pairs, are
  (==, {}),
  (B=R, {(3,1)}),
  (BBRR, {(3,1),(4,2)}),
  (RBBR, {(1,3),(4,2)}),
  (R=B, {(1,3)}),
  (BRRB, {(2,4),(3,1)}),
  (RRBB, {(1,3),(2,4)}).
(End)
		

References

  • L. Euler, 1737.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 77.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See also A033815.
Numerators of the convergents of e are A001517, which has a similar interpretation to a(n) in terms of monomer-dimer configurations, but omitting the restriction that adjacent monomers not be mapped to each other by the bijection.
Polynomial coefficients are in A001498.

Programs

  • Maple
    f:=proc(n) option remember; if n <= 1 then 1 else f(n-2)+(4*n-2)*f(n-1); fi; end;
    [seq(f(n), n=0..20)]; # This is for the unsigned version. - N. J. A. Sloane, May 09 2016
    seq(simplify((-1)^n*KummerU(-n, -2*n, -1)), n = 0..17); # Peter Luschny, May 10 2022
  • Mathematica
    Table[(-1)^k (2k)! Hypergeometric1F1[-k, -2k, -1]/k!, {k, 0, 10}] (* Vladimir Reshetnikov, Feb 16 2011 *)
    nxt[{n_,a_,b_}]:={n+1,b,a-2b(2n+1)}; NestList[nxt,{1,1,-1},20][[All,2]] (* Harvey P. Dale, Aug 18 2017 *)
  • PARI
    {a(n)= if(n<0, n=-n-1); sum(k=0, n, (2*n-k)!/ (k!*(n-k)!)* (-1)^(n-k) )} /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n)= local(A); if(n<0, n= -n-1); A= sqrt(1 +4*x +x*O(x^n)); n!*polcoeff( exp((A-1)/2)/A, n)} /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n)= local(A); if(n<0, n= -n-1); n+=2 ; for(k= 1, n, A+= x*O(x^k); A= truncate( (1+x)* exp(A) -1-A) ); A+= x*O(x^n); A-= A^2; -(-1)^n*n!* polcoeff( serreverse(A), n)} /* Michael Somos, Apr 02 2007 */
    
  • Sage
    A002119 = lambda n: hypergeometric([-n, n+1], [], 1)
    [simplify(A002119(n)) for n in (0..17)] # Peter Luschny, Oct 17 2014

Formula

D-finite with recurrence a(n) = -2(2n-1)*a(n-1) + a(n-2). - T. D. Noe, Oct 26 2006
If y = x + Sum_{k>=2} A005363(k)*x^k/k!, then y = x + Sum_{k>=2} a(k-2)(-y)^k/k!. - Michael Somos, Apr 02 2007
a(-n-1) = a(n). - Michael Somos, Apr 02 2007
a(n) = (1/n!)*Integral_{x>=-1} (-x*(1+x))^n*exp(-(1+x)). - Paul Barry, Apr 19 2010
G.f.: 1/Q(0), where Q(k) = 1 - x + 2*x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 17 2013
Expansion of exp(x) in powers of y = x*(1 + x): exp(x) = 1 + y - y^2/2! + 7*y^3/3! - 71*y^4/4! + 1001*y^5/5! - .... E.g.f.: (1/sqrt(4*x + 1))*exp(sqrt(4*x + 1)/2 - 1/2) = 1 - x + 7*x^2/2! - 71*x^3/3! + .... - Peter Bala, Dec 15 2013
a(n) = hypergeom([-n, n+1], [], 1). - Peter Luschny, Oct 17 2014
a(n) = sqrt(Pi/exp(1)) * BesselI(1/2+n, 1/2) + (-1)^n * BesselK(1/2+n, 1/2) / sqrt(exp(1)*Pi). - Vaclav Kotesovec, Jul 22 2015
a(n) ~ (-1)^n * 2^(2*n+1/2) * n^n / exp(n+1/2). - Vaclav Kotesovec, Jul 22 2015
From G. C. Greubel, Aug 16 2017: (Start)
G.f.: (1/(1-t))*hypergeometric2f0(1, 1/2; -; -4*t/(1-t)^2).
E.g.f.: (1+4*t)^(-1/2) * exp((sqrt(1+4*t) - 1)/2). (End)
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*binomial(n+k,k)*k!. - Ilya Gutkovskiy, Nov 24 2017
a(n) = (-1)^n*KummerU(-n, -2*n, -1). - Peter Luschny, May 10 2022

Extensions

More terms from Vladeta Jovovic, Apr 03 2000

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

A267383 Number A(n,k) of acyclic orientations of the Turán graph T(n,k); square array A(n,k), n>=0, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 6, 14, 1, 1, 1, 2, 6, 18, 46, 1, 1, 1, 2, 6, 24, 78, 230, 1, 1, 1, 2, 6, 24, 96, 426, 1066, 1, 1, 1, 2, 6, 24, 120, 504, 2286, 6902, 1, 1, 1, 2, 6, 24, 120, 600, 3216, 15402, 41506, 1
Offset: 0

Views

Author

Alois P. Heinz, Jan 13 2016

Keywords

Comments

An acyclic orientation is an assignment of a direction to each edge such that no cycle in the graph is consistently oriented. Stanley showed that the number of acyclic orientations of a graph G is equal to the absolute value of the chromatic polynomial X_G(q) evaluated at q=-1.
Conjecture: In general, column k > 1 is asymptotic to n! / ((k-1) * (1 - log(k/(k-1)))^((k-1)/2) * k^n * (log(k/(k-1)))^(n+1)). - Vaclav Kotesovec, Feb 18 2017

Examples

			Square array A(n,k) begins:
  1,    1,    1,    1,    1,    1,    1, ...
  1,    1,    1,    1,    1,    1,    1, ...
  1,    2,    2,    2,    2,    2,    2, ...
  1,    4,    6,    6,    6,    6,    6, ...
  1,   14,   18,   24,   24,   24,   24, ...
  1,   46,   78,   96,  120,  120,  120, ...
  1,  230,  426,  504,  600,  720,  720, ...
  1, 1066, 2286, 3216, 3720, 4320, 5040, ...
		

Crossrefs

Main diagonal gives A000142.
A(2n,n) gives A033815.
A(n,ceiling(n/2)) gives A161132.
Bisection of column k=2 gives A048163.
Trisection of column k=3 gives A370961.
a(n^2,n) gives A372084.

Programs

  • Maple
    A:= proc(n, k) option remember; local b, l, q; q:=-1;
           l:= [floor(n/k)$(k-irem(n,k)), ceil(n/k)$irem(n,k)];
           b:= proc(n, j) option remember; `if`(j=1, (q-n)^l[1]*
                 mul(q-i, i=0..n-1), add(b(n+m, j-1)*
                 Stirling2(l[j], m), m=0..l[j]))
               end; forget(b);
           abs(b(0, k))
        end:
    seq(seq(A(n, 1+d-n), n=0..d), d=0..14);
  • Mathematica
    A[n_, k_] := A[n, k] = Module[{ b, l, q}, q = -1; l = Join[Array[Floor[n/k] &, k - Mod[n, k]], Array[ Ceiling[n/k] &, Mod[n, k]]]; b[nn_, j_] := b[nn, j] = If[j == 1, (q - nn)^l[[1]]*Product[q - i, {i, 0, nn - 1}], Sum[b[nn + m, j - 1]*StirlingS2[l[[j]], m], {m, 0, l[[j]]}]]; Abs[b[0, k]]]; Table[Table[A[n, 1 + d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

A334279 Irregular table read by rows: T(n, k) is the coefficient of x^k in the chromatic polynomial of the 1-skeleton of the n-dimensional cross polytope, 0 <= k <= 2n.

Original entry on oeis.org

0, 0, 1, 0, -3, 6, -4, 1, 0, -64, 154, -137, 58, -12, 1, 0, -2790, 7467, -7852, 4300, -1346, 244, -24, 1, 0, -205056, 593016, -698250, 448015, -175004, 43608, -6990, 700, -40, 1, 0, -22852200, 70164670, -89812001, 64407806, -29113410, 8790285, -1822164, 260868, -25405, 1610, -60, 1
Offset: 1

Views

Author

Peter Kagey, Apr 21 2020

Keywords

Comments

A033815 is the number of acyclic orientations of the n-dimensional cross polytope, which is the absolute value of the chromatic polynomial evaluated at -1.
Sums of absolute values of entries in each row give A033815.
These graphs are chromatically unique, that is, there is no nonisomorphic graph with the same chromatic polynomial.
Conjectures from Peter Kagey, Apr 26 2020: (Start)
T(n,1) = -A161131(2n-1).
T(n,2n-2) = A212689(2n - 1).
T(n,2n-1) = A046092(n-1). (End)

Examples

			Table begins:
n/k| 0       1      2       3      4       5     6     7   8   9 10
---+---------------------------------------------------------------
  1| 0       0      1
  2| 0      -3      6      -4      1
  3| 0     -64    154    -137     58     -12     1
  4| 0   -2790   7467   -7852   4300   -1346   244   -24   1
  5| 0 -205056 593016 -698250 448015 -175004 43608 -6990 700 -40  1
		

Crossrefs

A334278 is analogous for the n-dimensional hypercube.

A372326 Number A(n,k) of acyclic orientations of the Turán graph T(k*n,n); square array A(n,k), n>=0, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 14, 6, 1, 1, 1, 230, 426, 24, 1, 1, 1, 6902, 122190, 24024, 120, 1, 1, 1, 329462, 90768378, 165392664, 2170680, 720, 1, 1, 1, 22934774, 138779942046, 4154515368024, 457907248920, 287250480, 5040, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 27 2024

Keywords

Comments

The Turán graph T(k*n,n) is the complete n-partite graph K_{k,...,k}.
An acyclic orientation is an assignment of a direction to each edge such that no cycle in the graph is consistently oriented. Stanley showed that the number of acyclic orientations of a graph G is equal to the absolute value of the chromatic polynomial X_G(q) evaluated at q=-1.

Examples

			Square array A(n,k) begins:
  1,   1,       1,            1,                  1, ...
  1,   1,       1,            1,                  1, ...
  1,   2,      14,          230,               6902, ...
  1,   6,     426,       122190,           90768378, ...
  1,  24,   24024,    165392664,      4154515368024, ...
  1, 120, 2170680, 457907248920, 495810323060597880, ...
		

Crossrefs

Columns k=0-2 give: A000012, A000142, A033815.
Rows n=0+1,2-3 give: A000012, A048163(k+1), A370961.
Main diagonal gives A372084.
Cf. A267383.

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, add(
          expand(x*g(n-j))*binomial(n-1, j-1), j=1..n))
        end:
    A:= proc(n, k) option remember; local q, l, b; q, l, b:= -1, [k$n, 0],
          proc(n, j) option remember; `if`(j=1, mul(q-i, i=0..n-1)*
            (q-n)^l[1], add(b(n+m, j-1)*coeff(g(l[j]), x, m), m=0..l[j]))
          end; abs(b(0, nops(l)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    g[n_] := g[n] = If[n == 0, 1, Sum[Expand[x*g[n - j]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    A[n_, k_] := A[n, k] = Module[{q = -1, l, b}, l = Append[Table[k, {n}], 0];
       b[nn_, j_] := b[nn, j] = If[j == 1, Product[q - i, {i, 0, nn - 1}]*
       (q - nn)^l[[1]], Sum[b[nn + m, j - 1]*Coefficient[g[l[[j]]], x, m],
       {m, 0, l[[j]]}]];
       Abs[b[0, Length[l]]]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jun 09 2024, after Alois P. Heinz *)

Formula

A(n,k) = A267383(k*n,n).

A334247 Number of acyclic orientations of the edges of an n-dimensional cube.

Original entry on oeis.org

1, 2, 14, 1862, 193270310, 47171704165698393638
Offset: 0

Views

Author

Matthew Scroggs, Apr 20 2020

Keywords

Comments

a(n) is the absolute value of the chromatic polynomial of the n-hypercube graph evaluated at -1.

Examples

			For n=2, there are 14 ways to orient the edges of a square without cycles (see links).
		

Crossrefs

Cf. A334248 is the number of acyclic orientations with rotations and reflections of the same orientation excluded.
Cf. A033815 (cross-polytope), A058809 (wheel), A338152 (demihypercube), A338153 (prism), A338154 (antiprism).

Programs

  • Maple
    with(GraphTheory): with(SpecialGraphs):
    a:= n-> abs(ChromaticPolynomial(HypercubeGraph(n), -1)):
    seq(a(n), n=0..4);  # Alois P. Heinz, Jan 14 2025

Formula

a(n) = Sum_{k=1..2^n} (-1)^(2^n-k) * k! * A334159(n, k). - Andrew Howroyd, Apr 21 2020
a(n) = |Sum_{k=0..2^n} (-1)^k * A334278(n, k)|. - Peter Kagey, Oct 13 2020

Extensions

a(5) from Andrew Howroyd, Apr 23 2020

A161132 Number of permutations of {1,2,...,n} that have no even fixed points.

Original entry on oeis.org

1, 1, 1, 4, 14, 78, 426, 3216, 24024, 229080, 2170680, 25022880, 287250480, 3884393520, 52370755920, 812752093440, 12585067447680, 220448163358080, 3854801333416320, 75225258805132800, 1465957162768492800, 31537353006189676800, 677696237345719468800
Offset: 0

Views

Author

Emeric Deutsch, Jul 18 2009

Keywords

Examples

			a(3)=4 because we have 132, 312, 213, and 231.
		

Crossrefs

Programs

  • Maple
    d[0] := 1: for n to 25 do d[n] := n*d[n-1]+(-1)^n end do: a := proc (n) options operator, arrow: add(d[n-j]*binomial(ceil((1/2)*n), j), j = 0 .. ceil((1/2)*n)) end proc: seq(a(n), n = 0 .. 22);
    a := proc (n) options operator, arrow: add((-1)^j*binomial(floor((1/2)*n), j)*factorial(n-j), j = 0 .. floor((1/2)*n)) end proc; seq(a(n), n = 0 .. 22); # Emeric Deutsch, Jul 18 2009
    a := n -> n!*hypergeom([-floor(n/2)], [-n], -1):
    seq(simplify(a(n)), n = 0..22);  # Peter Luschny, Jul 15 2022
  • Mathematica
    a[n_] := Sum[Subfactorial[n-j]*Binomial[Ceiling[n/2], j], {j, 0, Ceiling[ n/2]}]; Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Feb 19 2017 *)
  • PARI
    for (n=0, 30, print1(sum(j=0, floor(n/2), (-1)^j*binomial(floor(n/2),j)*(n - j)!),", ")) \\ Indranil Ghosh, Mar 08 2017
    
  • Python
    import math
    f=math.factorial
    def C(n, r): return f(n)/ f(r)/ f(n - r)
    def A161132(n):
        s=0
        for j in range(0, (n/2)+1):
            s += (-1)**j*C(n/2, j)*f(n - j)
        return s # Indranil Ghosh, Mar 08 2017

Formula

a(n) = Sum_{j=0..ceiling(n/2)} d(n-j)*binomial(ceiling(n/2), j), where d(i) = A000166(i) are the derangement numbers.
a(n) = Sum_{j=0..floor(n/2)} (-1)^j*binomial(floor(n/2),j)*(n-j)!.
a(n) = A267383(n,ceiling(n/2)). - Alois P. Heinz, Jan 13 2016
a(n) ~ exp(-1/2) * n!. - Vaclav Kotesovec, Feb 18 2017
From Mark van Hoeij, Jul 15 2022: (Start)
a(2*n) = A033815(n),
a(2*n+1) = (A033815(n) + A033815(n+1)/(n+1))/2. (End)
From Peter Luschny, Jul 15 2022: (Start)
a(n) = n!*hypergeom([-floor(n/2)], [-n], -1).
a(n) = A068106(n, ceiling(n/2)). (End)
D-finite with recurrence +16*a(n) -24*a(n-1) +4*(-4*n^2+8*n+3)*a(n-2) +4*(2*n^2-10*n+9)*a(n-3) +2*(-4*n^2+22*n-31)*a(n-4) +2*(n-2)*(n-4)*a(n-5) -(n-4)*(n-5)*a(n-6)=0. - R. J. Mathar, Jul 26 2022

A338153 a(n) is the number of acyclic orientations of the edges of the n-prism.

Original entry on oeis.org

204, 1862, 14700, 109334, 790524, 5633222, 39828300, 280376054, 1968934044, 13807724582, 96754776300, 677686169174, 4745413960764, 33224340503942, 232596153986700, 1628276158432694, 11398345428510684, 79790067272259302, 558537067986067500, 3909785864202510614
Offset: 3

Views

Author

Peter Kagey, Oct 13 2020

Keywords

Comments

Conjectured linear recurrence and g.f. confirmed by Kagey's formula. - Ray Chandler, Mar 10 2024

Examples

			For n = 4, the 4-prism is the 3-dimensional cube, so a(4) = A334247(3) = 1862.
		

Crossrefs

Cf. A033815 (cross-polytope), A058809 (wheel), A334247 (cube), A338152 (n-demihypercube), A338154 (n-antiprism).

Programs

Formula

Conjectures from Colin Barker, Oct 13 2020: (Start)
G.f.: 2*x^3*(102 - 497*x + 742*x^2 - 392*x^3) / ((1 - x)*(1 - 2*x)*(1 - 4*x)*(1 - 7*x)).
a(n) = 14*a(n-1) - 63*a(n-2) + 106*a(n-3) - 56*a(n-4) for n>6.
(End)
a(n) = 5 + 7^n - 2^(n+1) - 2*4^n. - Peter Kagey, Nov 15 2020

A338154 a(n) is the number of acyclic orientations of the edges of the n-antiprism.

Original entry on oeis.org

426, 4968, 50640, 486930, 4547088, 41796168, 380789562, 3451622904, 31194607488, 281440825122, 2536622917920, 22848990484344, 205743704494026, 1852238413383048, 16673036119790640, 150072652217086770, 1350735146332489008, 12157047307392618408
Offset: 3

Views

Author

Peter Kagey, Oct 13 2020

Keywords

Comments

Conjectured linear recurrence and g.f. confirmed by Kagey's formula. - Ray Chandler, Mar 10 2024

Examples

			For n = 3, the 3-antiprism is the octahedron (3-dimensional cross-polytope), so a(3) = A033815(3) = 426.
		

Crossrefs

Cf. A033815 (cross-polytope), A058809 (wheel), A334247 (hypercube), A338152 (demihypercube), A338153 (prism).

Programs

  • Mathematica
    A338154[n_] := Round[-2^(1-n)*((7 - Sqrt[13])^n + (7 + Sqrt[13])^n) + 9^n + 5] (* Peter Kagey, Nov 15 2020 *)

Formula

Conjectures from Colin Barker, Oct 13 2020: (Start)
G.f.: 6*x^3*(71 - 379*x + 612*x^2 - 324*x^3) / ((1 - x)*(1 - 9*x)*(1 - 7*x + 9*x^2)).
a(n) = 17*a(n-1) - 88*a(n-2) + 153*a(n-3) - 81*a(n-4) for n>6.
(End)
a(n) = -2^(1-n)*((7-sqrt(13))^n + (7+sqrt(13))^n) + 9^n + 5. - Peter Kagey, Nov 15 2020
Showing 1-10 of 13 results. Next