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.

A288312 Number of endofunctions on [2n] such that the image size equals n.

Original entry on oeis.org

1, 2, 84, 10800, 2857680, 1285956000, 880599202560, 853262368358400, 1111400775560275200, 1873276460474747328000, 3967400888465895264384000, 10313998054713896966296473600, 32291970618091110826769565696000, 119851615755915509174015455948800000
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Examples

			a(1) = 2: (1,1), (2,2).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=n, n!,
          `if`(k=0, 0, n*(b(n-1, k-1)+b(n-1, k)*k/(n-k))))
        end:
    a:= n-> b(2*n, n):
    seq(a(n), n=0..15);
  • Mathematica
    Table[StirlingS2[2*n, n]*(2*n)!/n!, {n, 0, 20}] (* Vaclav Kotesovec, Jun 10 2017 *)
  • PARI
    a(n)=stirling(2*n, n, 2)*n!*binomial(2*n, n); \\ Indranil Ghosh, Jul 04 2017
    
  • Python
    from mpmath import *
    mp.dps=100
    def a(n): return int(stirling2(2*n, n)*fac(n)*binomial(2*n, n))
    print([a(n) for n in range(21)]) # Indranil Ghosh, Jul 04 2017

Formula

a(n) = Stirling2(2*n,n) * n! * binomial(2*n,n).
a(n) = A090657(2n,n) = A101817(2n,n) = A219859(2n,n).
a(n) ~ n^(2*n - 1/2) * 2^(4*n) / (sqrt(Pi*(1-c)) * c^n * (2-c)^n * exp(2*n)), where c = -LambertW(-2*exp(-2)) = -A226775 = 0.4063757399599599... - Vaclav Kotesovec, Jun 10 2017

A209290 Number of elements whose preimage is the empty set summed over all functions f:{1,2,...,n}->{1,2,...,n}.

Original entry on oeis.org

0, 0, 2, 24, 324, 5120, 93750, 1959552, 46118408, 1207959552, 34867844010, 1100000000000, 37661140520652, 1390911669927936, 55123269399790046, 2333521433367183360, 105094533691406250000, 5017514388048998039552, 253135520137219049838162, 13456471561751415850795008
Offset: 0

Views

Author

Geoffrey Critzer, Jan 16 2013

Keywords

Comments

a(n)/n^n is the expected value of the number of such elements which approaches n/e as n gets large.
a(n) = Sum_{k=1..n} A219859(n,k)*k.
a(n) = 2 * A109391(n-1) = 2 * A000217(n-1) * A000312(n-1) for n>0.
a(n-1) is the number of length-n words of n-1 letters where adjacent letters are distinct, see example. - Joerg Arndt, Jun 10 2013

Examples

			From _Joerg Arndt_, Jun 10 2013: (Start)
There are a(4-1)=a(3)=24 length-4 words of 3 letters (0,1,2) where adjacent letters are distinct:
01:  [ 0 1 0 1 ]
02:  [ 0 1 0 2 ]
03:  [ 0 1 2 0 ]
04:  [ 0 1 2 1 ]
05:  [ 0 2 0 1 ]
06:  [ 0 2 0 2 ]
07:  [ 0 2 1 0 ]
08:  [ 0 2 1 2 ]
09:  [ 1 0 1 0 ]
10:  [ 1 0 1 2 ]
11:  [ 1 0 2 0 ]
12:  [ 1 0 2 1 ]
13:  [ 1 2 0 1 ]
14:  [ 1 2 0 2 ]
15:  [ 1 2 1 0 ]
16:  [ 1 2 1 2 ]
17:  [ 2 0 1 0 ]
18:  [ 2 0 1 2 ]
19:  [ 2 0 2 0 ]
20:  [ 2 0 2 1 ]
21:  [ 2 1 0 1 ]
22:  [ 2 1 0 2 ]
23:  [ 2 1 2 0 ]
24:  [ 2 1 2 1 ]
(End)
		

Crossrefs

Cf. A219859.

Programs

  • Mathematica
    Table[n (n-1)^n,{n,0,20}]
  • PARI
    a(n) = n*(n-1)^n; \\ Michel Marcus, Aug 22 2017

Formula

a(n) = n*(n - 1)^n.

A344053 a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*Stirling2(n, k)*k!.

Original entry on oeis.org

1, 1, 0, -9, -40, 125, 3444, 18571, -241872, -5796711, -24387220, 1132278191, 25132445832, 8850583573, -10681029498972, -214099676807085, 1643397436986464, 176719161389104817, 2976468247699317468, -71662294521163070153, -4638920054290748840520, -55645074852328083377619
Offset: 0

Views

Author

Peter Luschny, May 10 2021

Keywords

Comments

Inverse binomial convolution of the Fubini numbers (A131689).

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(n - k) * Binomial[n, k] * StirlingS2[n, k] * k!, {k, 0, n}]; Array[a, 22, 0] (* Amiram Eldar, May 10 2021 *)
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*stirling(n, k, 2)*k!); \\ Michel Marcus, May 10 2021

Formula

a(n) = Sum_{k=0..n} (-1)^k * A219859(n,k). - Alois P. Heinz, Jan 24 2022
a(n) = n! * [x^n] (2 - exp(-x))^n. - Fabian Pereyra, Aug 31 2024
Showing 1-3 of 3 results.