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.

Previous Showing 11-20 of 114 results. Next

A010842 Expansion of e.g.f.: exp(2*x)/(1-x).

Original entry on oeis.org

1, 3, 10, 38, 168, 872, 5296, 37200, 297856, 2681216, 26813184, 294947072, 3539368960, 46011804672, 644165281792, 9662479259648, 154599668219904, 2628194359869440, 47307498477912064, 898842471080853504, 17976849421618118656, 377513837853982588928
Offset: 0

Views

Author

Keywords

Comments

Incomplete Gamma Function at 2, more precisely: a(n) = exp(2)*Gamma(1+n,2).
Let P(A) be the power set of an n-element set A. Then a(n) = the total number of ways to add 0 or more elements of A to each element x of P(A) where the elements to add are not elements of x and order of addition is important. - Ross La Haye, Nov 19 2007
a(n) is the number of ways to split the set {1,2,...,n} into two disjoint subsets S,T with S union T = {1,2,...,n} and linearly order S and then choose a subset of T. - Geoffrey Critzer, Mar 10 2009

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 262.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 5.1.2.

Crossrefs

Programs

  • Magma
    m:=45; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Exp(2*x)/(1-x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Oct 16 2018
  • Maple
    G(x):=exp(2*x)/(1-x): f[0]:=G(x): for n from 1 to 19 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..19); # Zerinvary Lajos, Apr 03 2009
    seq(simplify(exp(1)^2*GAMMA(n+1, 2)), n=0..19); # Peter Luschny, Apr 28 2016
    seq(simplify(KummerU(-n, -n, 2)), n=0..21); # Peter Luschny, May 10 2022
  • Mathematica
    With[{r = Round[n! E^2 - 2^(n + 1)/(n + 1)]}, r - Mod[r, 2^(n - Floor[2/n + Log2[n]])]] (* for n>=4; Stan Wagon, Apr 28 2016 *)
    a[n_] := n! Sum[2^i/i!, {i, 0, n}]
    Table[a[n], {n, 0, 21}] (* Gerry Martens , May 06 2016 *)
    With[{nn=30},CoefficientList[Series[Exp[2x]/(1-x),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, May 27 2019 *)
  • PARI
    x='x+O('x^44); Vec(serlaplace(exp(2*x)/(1-x))) \\ Joerg Arndt, Apr 29 2016
    

Formula

a(n) = row sums of A090802. - Ross La Haye, Aug 18 2006
a(n) = n*a(n-1) + 2^n = (n+2)*a(n-1) - (2*n-2)*a(n-2) = n!*Sum_{j=0..n} floor(2^j/j!). - Henry Bottomley, Jul 12 2001
a(n) is the permanent of the n X n matrix with 3's on the diagonal and 1's elsewhere. a(n) = Sum_{k=0..n} A008290(n, k)*3^k. - Philippe Deléham, Dec 12 2003
Binomial transform of A000522. - Ross La Haye, Sep 15 2004
a(n) = Sum_{k=0..n} k!*binomial(n, k)*2^(n-k). - Paul Barry, Apr 22 2005
a(n) = A066534(n) + 2^n. - Ross La Haye, Nov 16 2005
G.f.: hypergeom([1,k],[],x/(1-2*x))/(1-2*x) with k=1,2,3 is the generating function for A010842, A081923, and A082031. - Mark van Hoeij, Nov 08 2011
E.g.f.: 1/E(0), where E(k) = 1 - x/(1-2/(2+(k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
G.f.: 1/Q(0), where Q(k)= 1 - 2*x - x*(k+1)/(1-x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 18 2013
a(n) ~ n! * exp(2). - Vaclav Kotesovec, Jun 01 2013
From Peter Bala, Sep 25 2013: (Start)
a(n) = n!*e^2 - Sum_{k >= 0} 2^(n + k + 1)/((n + 1)*...*(n + k + 1)).
= n!*e^2 - e^2*( Integral_{t = 0..2} t^n*exp(-t) dt )
= e^2*( Integral_{t >= 2} t^n*exp(-t) dt )
= e^2*( Integral_{t >= 0} t^n*exp(-t)*Heaviside(t-2) dt ),
an integral representation of a(n) as the n-th moment of a nonnegative function on the positive half-axis.
Bottomley's second-order recurrence above a(n) = (n + 2)*a(n-1) - 2*(n - 1)*a(n-2) has n! as a second solution. This yields the finite continued fraction expansion a(n)/n! = 1/(1 - 2/(3 - 2/(4 - 4/(5 - ... - 2*(n - 1)/(n + 2))))) valid for n >= 2. Letting n tend to infinity gives the infinite continued fraction expansion e^2 = 1/(1 - 2/(3 - 2/(4 - 4/(5 - ... - 2*(n - 1)/(n + 2 - ...))))). (End)
a(n) = 2^(n+1)*U(1, n+2, 2), where U is the Bessel U function. - Peter Luschny, Nov 26 2014
For n >= 4, a(n) = r - (r mod 2^(n - floor((2/n) + log_2(n)))) where r = n! * e^2 - 2^(n+1)/(n+1). - Stan Wagon, Apr 28 2016
G.f.: A(x) = 1/(1 - 2*x - x/(1 - x/(1 - 2*x - 2*x/(1 - 2*x/(1 - 2*x - 3*x/(1 - 3*x/(1 - 2*x - 4*x/(1 - 4*x/(1 - 2*x - ... ))))))))). - Peter Bala, May 26 2017
a(n) = Sum_{k=0..n} (-1)^(n-k)*A137346(n, k). - Mélika Tebni, May 10 2022 [This is equivalent to a(n) = KummerU(-n, -n, 2). - Peter Luschny, May 10 2022]
a(n) = F(n), where the function F(x) := 2^(x+1) * Integral_{t >= 0} e^(-2*t)*(1 + t)^x dt smoothly interpolates this sequence to all real values of x. - Peter Bala, Sep 05 2023

A352827 Heinz numbers of integer partitions y with a fixed point y(i) = i. Such a fixed point is unique if it exists.

Original entry on oeis.org

2, 4, 8, 9, 15, 16, 18, 21, 27, 30, 32, 33, 36, 39, 42, 45, 51, 54, 57, 60, 63, 64, 66, 69, 72, 78, 81, 84, 87, 90, 93, 99, 102, 108, 111, 114, 117, 120, 123, 125, 126, 128, 129, 132, 135, 138, 141, 144, 153, 156, 159, 162, 168, 171, 174, 175, 177, 180, 183
Offset: 1

Views

Author

Gus Wiseman, Apr 06 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
    2: (1)
    4: (1,1)
    8: (1,1,1)
    9: (2,2)
   15: (3,2)
   16: (1,1,1,1)
   18: (2,2,1)
   21: (4,2)
   27: (2,2,2)
   30: (3,2,1)
   32: (1,1,1,1,1)
   33: (5,2)
   36: (2,2,1,1)
   39: (6,2)
   42: (4,2,1)
   45: (3,2,2)
   51: (7,2)
   54: (2,2,2,1)
For example, the partition (3,2,2) with Heinz number 45 has a fixed point at position 2, so 45 is in the sequence.
		

Crossrefs

* = unproved
*These partitions are counted by A001522, strict A352829.
*The complement is A352826, counted by A064428.
The complement reverse version is A352830, counted by A238394.
The reverse version is A352872, counted by A238395
A000700 counts self-conjugate partitions, ranked by A088902.
A001222 counts prime indices, distinct A001221.
A008290 counts permutations by fixed points, unfixed A098825.
A056239 adds up prime indices, row sums of A112798 and A296150.
A115720 and A115994 count partitions by their Durfee square.
A122111 represents partition conjugation using Heinz numbers.
A124010 gives prime signature, sorted A118914, conjugate rank A238745.
A238349 counts compositions by fixed points, complement A352523.
A238352 counts reversed partitions by fixed points, rank statistic A352822.
A352828 counts strict partitions without a fixed point.
A352833 counts partitions by fixed points.

Programs

  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Select[Range[100],pq[Reverse[Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]]==1&]

A000387 Rencontres numbers: number of permutations of [n] with exactly two fixed points.

Original entry on oeis.org

0, 0, 1, 0, 6, 20, 135, 924, 7420, 66744, 667485, 7342280, 88107426, 1145396460, 16035550531, 240533257860, 3848532125880, 65425046139824, 1177650830516985, 22375365779822544, 447507315596451070, 9397653627525472260, 206748379805560389951
Offset: 0

Views

Author

Keywords

Comments

Also: odd permutations of length n with no fixed points. - Martin Wohlgemuth (mail(AT)matroid.com), May 31 2003
Also number of cycles of length 2 in all derangements of [n]. Example: a(4)=6 because in the derangements of [4], namely (1432), (1342), (13)(24), (1423), (12)(34), (1243), (1234), (1324), and (14)(23), we have altogether 6 cycles of length 2. - Emeric Deutsch, Mar 31 2009

Examples

			a(4)=6 because we have 1243, 1432, 1324, 4231, 3214, and 2134. - _Emeric Deutsch_, Mar 31 2009
		

References

  • A. Kaufmann, Introduction à la combinatorique en vue des applications, Dunod, Paris, 1968 (see p. 92).
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 65.
  • 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

Column k=2 of A008290.
Cf. A003221.
A diagonal of A008291.
Cf. A170942.

Programs

  • Maple
    A000387:= n-> -add((n-1)!*add((-1)^k/(k-1)!, j=0..n-1), k=1..n-1)/2: seq(A000387(n), n=0..25); # Zerinvary Lajos, May 18 2007
    A000387 := n -> (-1)^n*(hypergeom([-n,1],[],1)+n-1)/2:
    seq(simplify(A000387(n)), n=0..22); # Peter Luschny, May 09 2017
  • Mathematica
    Table[Subfactorial[n - 2]*Binomial[n, 2], {n, 0, 22}] (* Zerinvary Lajos, Jul 10 2009 *)
  • PARI
    my(x='x+O('x^33)); concat([0,0], Vec( serlaplace(exp(-x)/(1-x)*(x^2/2!)) ) ) \\ Joerg Arndt, Feb 19 2014
    
  • PARI
    a(n) = ( n!*sum(r=2, n, (-1)^r/r!) - (-1)^(n-1)*(n-1))/2; \\ Michel Marcus, Apr 22 2016
  • Python
    A145221_list, m, x = [], 1, 0
    for n in range(201):
        x, m = x*n + m*(n*(n-1)//2), -m
        A145221_list.append(x) # Chai Wah Wu, Sep 23 2014
    

Formula

a(n) = Sum_{j=2..n-2} (-1)^j*n!/(2!*j!) = A008290(n,2).
a(n) = (n!/2) * Sum_{i=0..n-2} ((-1)^i)/i!.
a(n) = A000166(n) - A003221(n).
a(n) = A000166(n-2)*binomial(n, 2). - David Wasserman, Aug 13 2004
E.g.f.: z^2*exp(-z)/(2*(1-z)). - Emeric Deutsch, Jul 22 2009
a(n) ~ n!*exp(-1)/2. - Steven Finch, Mar 11 2022
a(n) = n*a(n-1) + (-1^n)*n*(n-1)/2, a(0) = 0. - Chai Wah Wu, Sep 23 2014
a(n) = A003221(n) + (-1)^n*(n-1) (see Miska). - Michel Marcus, Aug 11 2015
O.g.f.: (1/2)*Sum_{k>=2} k!*x^k/(1 + x)^(k+1). - Ilya Gutkovskiy, Apr 13 2017
D-finite with recurrence +(-n+2)*a(n) +n*(n-3)*a(n-1) +n*(n-1)*a(n-2)=0. - R. J. Mathar, Jul 06 2023

Extensions

Prepended a(0)=a(1)=0, Joerg Arndt, Apr 22 2016

A008291 Triangle of rencontres numbers.

Original entry on oeis.org

1, 2, 3, 9, 8, 6, 44, 45, 20, 10, 265, 264, 135, 40, 15, 1854, 1855, 924, 315, 70, 21, 14833, 14832, 7420, 2464, 630, 112, 28, 133496, 133497, 66744, 22260, 5544, 1134, 168, 36, 1334961, 1334960, 667485, 222480, 55650, 11088, 1890, 240, 45, 14684570
Offset: 2

Views

Author

Keywords

Comments

T(n,k) = number of permutations of n elements with k fixed points.
T(n,n-1)=0 and T(n,n)=1 are omitted from the array. - Geoffrey Critzer, Nov 28 2011.

Examples

			Triangle begins:
       1
       2      3
       9      8     6
      44     45    20    10
     265    264   135    40   15
    1854   1855   924   315   70   21
   14833  14832  7420  2464  630  112  28
  133496 133497 66744 22260 5544 1134 168 36
  ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 194.
  • Kaufmann, Arnold. "Introduction a la combinatorique en vue des applications." Dunod, Paris, 1968. See p. 92.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 65.

Crossrefs

Row sums give A033312.
Cf. A320582.

Programs

  • Maple
    T:= proc(n, k) T(n, k):= `if`(k=0, `if`(n<2, 1-n, (n-1)*
          (T(n-1, 0)+T(n-2, 0))), binomial(n, k)*T(n-k, 0))
        end:
    seq(seq(T(n, k), k=0..n-2), n=2..12);  # Alois P. Heinz, Mar 17 2013
  • Mathematica
    Prepend[Flatten[f[list_]:=Select[list,#>1&];Map[f,Drop[Transpose[Table[d = Exp[-x]/(1 - x);Range[0, 10]! CoefficientList[Series[d x^k/k!, {x, 0, 10}],x], {k, 0, 8}]], 3]]], 1] (* Geoffrey Critzer, Nov 28 2011 *)
  • PARI
    T(n, k)= if(k<0 || k>n, 0, n!/k!*sum(i=0, n-k, (-1)^i/i!))

Formula

T(n,k) = binomial(n,k)*A000166(n-k) = A008290(n,k).
E.g.f. for column k: (x^k/k!)(exp(-x)/(1-x)). - Geoffrey Critzer, Nov 28 2011
Row generating polynomials appear to be given by -1 + sum {k = 0..n} (-1)^(n+k)*C(n,k)*(1+k*x)^(n-k)*(2+(k-1)*x)^k. - Peter Bala, Dec 29 2011

Extensions

Comments and more terms from Michael Somos, Apr 26 2000

A053486 E.g.f.: exp(3x)/(1-x).

Original entry on oeis.org

1, 4, 17, 78, 393, 2208, 13977, 100026, 806769, 7280604, 72865089, 801693126, 9620848953, 125072630712, 1751021612937, 26265338542962, 420245459734113, 7144172944620084, 128595113390582001, 2443307155583319486, 48866143115153174121
Offset: 0

Views

Author

N. J. A. Sloane, Jan 15 2000

Keywords

Crossrefs

Programs

  • Maple
    G(x):=exp(3*x)/(1-x): g[0]:=G(x): for n from 1 to 20 do g[n]:=diff(g[n-1],x) od: x:=0: seq(g[n],n=0..20); # Zerinvary Lajos, Apr 03 2009
    A053486 := n -> exp(3)*GAMMA(1+n,3):
    seq(simplify(A053486(n)), n=0..20); # Peter Luschny, Dec 18 2017
    seq(simplify(KummerU(-n, -n, 3)), n = 0..20); # Peter Luschny, May 10 2022
  • Mathematica
    RecurrenceTable[{a[0]==1, a[n]== n*a[n-1] + 3^n}, a, {n, 200}] (* Vincenzo Librandi, Nov 15 2012 *)
    With[{nn=20},CoefficientList[Series[Exp[3x]/(1-x),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Aug 03 2017 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp(3*x)/(1-x))) \\ Joerg Arndt, Apr 20 2013

Formula

a(n) is the permanent of the n X n matrix with 4's on the diagonal and 1's elsewhere. a(n) = Sum(k=0..n, A008290(n, k)*4^k). - Philippe Deléham, Dec 12 2003
a(n) = Sum[(n! / k!) * 3^k {k=0...n}]. - Ross La Haye, Sep 21 2004
a(n) = sum{k=0..n, k!*C(n, k)3^(n-k)}. - Paul Barry, Apr 22 2005
G.f.: hypergeom([1,1],[],x/(1-3*x))/(1-3*x). - Mark van Hoeij, Nov 08 2011
D-finite with recurrence -a(n) +(n+3)*a(n-1) +3*(1-n)*a(n-2)=0. - R. J. Mathar, Nov 14 2011. This recurrence follows from the Wilf-Zeilberger (WZ) proof technique applied to the sum: Sum[k!* C(n,k)*3^(n-k), {k=0...n}]. - T. Amdeberhan, Jul 23 2012
E.g.f.: 1/E(0) where E(k)=1-x/(1-3/(3+(k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
G.f.: 1/Q(0), where Q(k)= 1 - 3*x - x*(k+1)/(1-x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 20 2013
a(n) ~ n! * exp(3). - Vaclav Kotesovec, Jun 01 2013
From Peter Bala, Sep 25 2013: (Start)
a(n) = n*a(n-1) + 3^n with a(0) = 1.
a(n) = n!*e^3 - sum {k >= 0} 3^(n + k + 1)/((n + 1)*...*(n + k + 1))
= n!*e^3 - e^3*( int {t = 0..3} t^n*exp(-t) dt )
= e^3*( int {t = 3..inf} t^n*exp(-t) dt )
= e^3*( int {t = 0..inf} t^n*exp(-t)*Heaviside(t-3) dt ),
an integral representation of a(n) as the n-th moment of a nonnegative function on the positive half-axis.
Mathar's second-order recurrence above a(n) = (n + 3)*a(n-1) - 3*(n - 1)*a(n-2) has n! as a second solution. This yields the finite continued fraction expansion a(n)/n! = 1/(1 - 3/(4 - 3/(5 - 6/(6 - ...- 3*(n - 1)/(n + 3))))) valid for n >= 2. Letting n tend to infinity gives the infinite continued fraction expansion e^3 = 1/(1 - 3/(4 - 3/(5 - 6/(6 - ...- 3*(n - 1)/(n + 3 - ...))))). (End)
G.f.: 1/Q(0), where Q(k) = 1 - 2*x*(k+2) - x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Sep 30 2013
a(n) = exp(3)*Gamma(1+n,3). - Peter Luschny, Dec 18 2017
a(n) = KummerU(-n, -n, 3). - Peter Luschny, May 10 2022

A056272 Word structures of length n using a 5-ary alphabet.

Original entry on oeis.org

1, 1, 2, 5, 15, 52, 202, 855, 3845, 18002, 86472, 422005, 2079475, 10306752, 51263942, 255514355, 1275163905, 6368612302, 31821472612, 159042661905, 795019337135, 3974515030652, 19870830712482, 99348921288655
Offset: 0

Views

Author

Keywords

Comments

Permuting the alphabet will not change a word structure. Thus aabc and bbca have the same structure.
Density of regular language L over {1,2,3,4}^* (i.e., number of strings of length n in L) described by regular expression 11* + 11*2(1+2)* + 11*2(1+2)*3(1+2+3)* + 11*2(1+2)*3(1+2+3)*4(1+2+3+4)* + 11*2(1+2)*3(1+2+3)*4(1+2+3+4)*5(1+2+3+4+5)* - Nelma Moreira, Oct 10 2004
Number of set partitions of [n] into at most 5 parts. - Joerg Arndt, Apr 18 2014

Examples

			For a(4)=15, the 7 achiral patterns are AAAA, AABB, ABAB, ABBA, ABBC, ABCA, and ABCD; the 8 chiral patterns are the 4 pairs AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB.
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

A row of the array in A278984.
Cf. A056324 (unoriented), A320935 (chiral), A305751 (achiral).

Programs

  • GAP
    List([0..25],n->Sum([0..5],k->Stirling2(n,k))); # Muniru A Asiru, Oct 30 2018
  • Magma
    I:=[1,1,2,5,15]; [n le 5 select I[n] else 11*Self(n-1)-41*Self(n-2)+61*Self(n-3)-30*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Apr 19 2014
    
  • Maple
    seq(add(combinat:-stirling2(n, j), j=0..5), n=0..23); # Zerinvary Lajos, Dec 04 2007
    # Alternative:
    (x*(x*(x*(11*x-37)+32)-10)+1)/(x*(x*(x*(30*x-61)+41)-11)+1):
    series(%, x, 32): seq(coeff(%, x, n), n=0..23); # Peter Luschny, Nov 05 2018
  • Mathematica
    CoefficientList[Series[(1 - 10 x + 32 x^2 - 37 x^3 + 11 x^4)/((x - 1) (3 x - 1) (2 x - 1) (5 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 19 2014 *)
    LinearRecurrence[{11,-41,61,-30},{1,1,2,5,15},30] (* Harvey P. Dale, Feb 25 2018 *)
    Table[Sum[StirlingS2[n, k], {k, 0, 5}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
    CoefficientList[Series[1/120 (44 + 45 E^x + 20 E^(2 x) + 10 E^(3 x) + E^(5 x)), {x, 0, 30}], x]*Table[k!, {k, 0, 30}] (* Stefano Spezia, Nov 06 2018 *)
  • PARI
    a(n) = sum(k=0,5, stirling(n, k, 2) ); \\ Joerg Arndt, Apr 18 2014
    

Formula

a(n) = Sum_{k=0..5} Stirling2(n, k).
a(n) = (5^n + 10*3^n + 20*2^n + 45)/5! for n >= 1. - Vladeta Jovovic, Aug 17 2003
From Nelma Moreira, Oct 10 2004: (Start)
For c=5, a(n) = c^n/c! + Sum_{k=0..c-2} (k^n/k!*(Sum_{j=2..c-k} (-1)^j/j!)).
a(n) = Sum_{k=1..c} g(k, c)*k^n where g(1, 1) = 1, g(1, c) = g(1, c-1) + (-1)^(c-1)/(c-1)! if c > 1; g(k, c) = g(k-1, c-1)/k if c > 1, 2 <= k <= c and n >= 1. (End)
a(n+1) is the top entry of the vector M^n*[1,1,1,1,1,0,0,0,...], where M is an infinite bidiagonal matrix with M(r,r+1)=1 in the superdiagonal and M(r,r)=r, r>=1 as the main diagonal, and the rest zeros. The n-th power of the matrix is multiplied from the right with a column vector starting with 5 1's. - Gary W. Adamson, Jun 24 2011
G.f.: (1 - 10x + 32x^2 - 37x^3 + 11x^4)/((1 - x)*(1 - 2x)*(1 - 3x)*(1 - 5x)). - R. J. Mathar, Jul 06 2011 [Adapted to offset 0 by Robert A. Russell, Oct 30 2018]
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=5. - Robert A. Russell, Apr 25 2018
E.g.f.: (1/120)*(44 + 45*exp(x) + 20*exp(2*x) + 10*exp(3*x) + exp(5*x)). - Stefano Spezia, Nov 06 2018

Extensions

a(0)=1 prepended by Robert A. Russell, Nov 06 2018

A059056 Penrice Christmas gift numbers, Card-matching numbers (Dinner-Diner matching numbers): Triangle T(n,k) = number of ways to get k matches for a deck with n cards, 2 of each kind.

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 4, 0, 1, 10, 24, 27, 16, 12, 0, 1, 297, 672, 736, 480, 246, 64, 24, 0, 1, 13756, 30480, 32365, 21760, 10300, 3568, 970, 160, 40, 0, 1, 925705, 2016480, 2116836, 1418720, 677655, 243360, 67920, 14688, 2655, 320, 60, 0, 1
Offset: 0

Views

Author

Barbara Haas Margolius (margolius(AT)math.csuohio.edu)

Keywords

Comments

This is a triangle of card matching numbers. A deck has n kinds of cards, 2 of each kind. The deck is shuffled and dealt in to n hands with 2 cards each. A match occurs for every card in the j-th hand of kind j. Triangle T(n,k) is the number of ways of achieving exactly k matches (k=0..2n). The probability of exactly k matches is T(n,k)/((2n)!/2^n).
Rows are of length 1,3,5,7,... = A005408(n). [Edited by M. F. Hasler, Sep 21 2015]
Analogous to A008290. - Zerinvary Lajos, Jun 10 2005

Examples

			There are 4 ways of matching exactly 2 cards when there are 2 different kinds of cards, 2 of each in each of the two decks so T(2,2)=4.
Triangle begins:
1
"0", 0, 1
1, '0', "4", 0, 1
10, 24, 27, '16', "12", 0, 1
297, 672, 736, 480, 246, '64', "24", 0, 1
13756, 30480, 32365, 21760, 10300, 3568, 970, '160', "40", 0, 1
925705, 2016480, 2116836, 1418720, 677655, 243360, 67920, 14688, 2655, '320', "60", 0, 1
Diagonal " ": T(n,2n-2) = 0, 4, 12, 24, 40, 60, 84, 112, 144, ... equals A046092
Diagonal ' ': T(n,2n-3) = 0, 16, 64, 160, 320, 560, 896, 1344, ... equals A102860
		

References

  • F. N. David and D. E. Barton, Combinatorial Chance, Hafner, NY, 1962, Ch. 7 and Ch. 12.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 174-178.
  • R. P. Stanley, Enumerative Combinatorics Volume I, Cambridge University Press, 1997, p. 71.

Crossrefs

Programs

  • Maple
    p := (x,k)->k!^2*sum(x^j/((k-j)!^2*j!),j=0..k); R := (x,n,k)->p(x,k)^n; f := (t,n,k)->sum(coeff(R(x,n,k),x,j)*(t-1)^j*(n*k-j)!,j=0..n*k);
    for n from 0 to 7 do seq(coeff(f(t,n,2),t,m)/2^n,m=0..2*n); od;
  • Mathematica
    p[x_, k_] := k!^2*Sum[ x^j/((k-j)!^2*j!), {j, 0, k}];
    R[x_, n_, k_] := p[x, k]^n;
    f[t_, n_, k_] := Sum[ Coefficient[ R[x, n, k], x, j]*(t-1)^j*(n*k-j)!, {j, 0, n*k}];
    Table[ Coefficient[ f[t, n, 2]/2^n, t, m], {n, 0, 6}, {m, 0, 2*n}] // Flatten
    (* Jean-François Alcover, Sep 17 2012, translated from Maple *)

Formula

G.f.: sum(coeff(R(x, n, k), x, j)*(t-1)^j*(n*k-j)!, j=0..n*k) where n is the number of kinds of cards, k is the number of cards of each kind (here k is 2) and R(x, n, k) is the rook polynomial given by R(x, n, k)=(k!^2*sum(x^j/((k-j)!^2*j!))^n (see Stanley or Riordan). coeff(R(x, n, k), x, j) indicates the j-th coefficient on x of the rook polynomial.

Extensions

Additional comments from Zerinvary Lajos, Jun 18 2007
Edited by M. F. Hasler, Sep 21 2015

A059071 Card-matching numbers (Dinner-Diner matching numbers) for 5 kinds of cards.

Original entry on oeis.org

1, 44, 45, 20, 10, 0, 1, 440192, 975360, 1035680, 696320, 329600, 114176, 31040, 5120, 1280, 0, 32, 52097831424, 179811290880, 298276007040, 315423836640, 237742646400, 135296008128, 60059024640
Offset: 0

Views

Author

Barbara Haas Margolius (margolius(AT)math.csuohio.edu)

Keywords

Comments

This is a triangle of card matching numbers. Two decks each have 5 kinds of cards, n of each kind. The first deck is laid out in order. The second deck is shuffled and laid out next to the first. A match occurs if a card from the second deck is next to a card of the same kind from the first deck. Triangle T(n,k) is the number of ways of achieving exactly k matches (k=0..5n). The probability of exactly k matches is T(n,k)/(5n)!.
Rows are of length 1,6,11,16,... = 5n+1 = A016861(n). - M. F. Hasler, Sep 20 2015

Examples

			There are 1,035,680 ways of matching exactly 2 cards when there are 2 cards of each kind and 5 kinds of card so T(2,2)=1,035,680.
		

References

  • F. N. David and D. E. Barton, Combinatorial Chance, Hafner, NY, 1962, Ch. 7 and Ch. 12.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 174-178.
  • R. P. Stanley, Enumerative Combinatorics Volume I, Cambridge University Press, 1997, p. 71.

Crossrefs

Programs

  • Maple
    p := (x,k)->k!^2*sum(x^j/((k-j)!^2*j!),j=0..k); R := (x,n,k)->p(x,k)^n; f := (t,n,k)->sum(coeff(R(x,n,k),x,j)*(t-1)^j*(n*k-j)!,j=0..n*k);
    for n from 0 to 3 do seq(coeff(f(t,5,n),t,m),m=0..5*n); od;
  • Mathematica
    p[x_, k_] := k!^2*Sum[ x^j/((k-j)!^2*j!), {j, 0, k}]; r[x_, n_, k_] := p[x, k]^n; f[t_, n_, k_] := Sum[ Coefficient[ r[x, n, k], x, j]*(t-1)^j*(n*k-j)!, {j, 0, n*k}]; Table[ Coefficient[ f[t, 5, n], t, m], {n, 0, 3}, {m, 0, 5*n}] // Flatten (* Jean-François Alcover, Mar 04 2013, translated from Maple *)

Formula

G.f.: sum(coeff(R(x, n, k), x, j)*(t-1)^j*(n*k-j)!, j=0..n*k) where n is the number of kinds of cards (5 in this case), k is the number of cards of each kind and R(x, n, k) is the rook polynomial given by R(x, n, k)=(k!^2*sum(x^j/((k-j)!^2*j!))^n (see Stanley or Riordan). coeff(R(x, n, k), x, j) indicates the coefficient for x^j of the rook polynomial.

Extensions

Edited by M. F. Hasler, Sep 20 2015

A098558 Expansion of e.g.f. (1+x)/(1-x).

Original entry on oeis.org

1, 2, 4, 12, 48, 240, 1440, 10080, 80640, 725760, 7257600, 79833600, 958003200, 12454041600, 174356582400, 2615348736000, 41845579776000, 711374856192000, 12804747411456000, 243290200817664000, 4865804016353280000, 102181884343418880000, 2248001455555215360000
Offset: 0

Views

Author

Paul Barry, Sep 14 2004

Keywords

Comments

Essentially the same as A052849: a(0)=0 and a(n) = A052849(n) for n>=1.
Equals row sums (unsigned) of triangle A158471. - Gary W. Adamson, Mar 20 2009
Also the number of graceful labelings of the star graph on n+1 nodes. - Eric W. Weisstein, Mar 31 2020

Crossrefs

Row sums of A008518 and of A128564.
Cf. A158471.

Programs

  • Magma
    [1] cat [2*Factorial(n): n in [1..30]]; // G. C. Greubel, Jan 17 2018
    
  • Mathematica
    Join[{1}, 2*Range[30]!] (* G. C. Greubel, Jan 17 2018 *)
    With[{nn=30},CoefficientList[Series[(1+x)/(1-x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jun 05 2021 *)
    a[n_] := Hypergeometric2F1Regularized[1, -n, 2 - n, -1];
    Table[a[n], {n, 0, 22}]  (* Peter Luschny, Apr 26 2024 *)
  • PARI
    concat([1], vector(30, n, 2*n!)) \\ G. C. Greubel, Jan 17 2018
    
  • SageMath
    CF = ComplexBallField(100)
    def a(n):
        return Integer(CF(-1).hypergeometric([1, -n], [2 - n], regularized=True))
    print([a(n) for n in range(23)]) # Peter Luschny, Apr 26 2024

Formula

a(n) = 2*n! - 0^n.
a(n) = Sum_{k=0..n} (k+1) * A008290(n,k). - Alois P. Heinz, Mar 11 2022
Sum_{n>=0} 1/a(n) = (e+1)/2. - Amiram Eldar, Feb 02 2023
a(n) = HypergeomRegularized([1, -n], [2 - n], -1). - Peter Luschny, Apr 26 2024

A238363 Coefficients for the commutator for the logarithm of the derivative operator [log(D),x^n D^n]=d[(xD)!/(xD-n)!]/d(xD) expanded in the operators :xD:^k.

Original entry on oeis.org

1, -1, 2, 2, -3, 3, -6, 8, -6, 4, 24, -30, 20, -10, 5, -120, 144, -90, 40, -15, 6, 720, -840, 504, -210, 70, -21, 7, -5040, 5760, -3360, 1344, -420, 112, -28, 8, 40320, -45360, 25920, -10080, 3024, -756, 168, -36, 9, -362880, 403200, -226800, 86400, -25200, 6048, -1260, 240, -45, 10
Offset: 1

Views

Author

Tom Copeland, Feb 25 2014

Keywords

Comments

Let D=d/dx and [A,B]=A·B-B·A. Then each row corresponds to the coefficients of the operators :xD:^k = x^k D^k in the expansion of the commutator [log(D),:xD:^n]=[-log(x),:xD:^n]=sum(k=0 to n-1, a(n,k) :xD:^k). The e.g.f. is derived from [log(D), exp(t:xD:)]=[-log(x), exp(t:xD:)]= log(1+t)exp(t:xD:), using the shift property exp(t:xD:)f(x)=f((1+t)x).
The reversed unsigned array is A111492.
See the mathoverflow link and link therein to an associated mathstackexchange question for other formulas for log(D). In addition, R_x = log(D) = -log(x) + c - sum[n=1 to infnty, (-1)^n 1/n :xD:^n/n!]=
-log(x) + Psi(1+xD) = -log(x) + c + Ein(:xD:), where c is the Euler-Mascheroni constant, Psi(x), the digamma function, and Ein(x), a breed of the exponential integrals (cf. Wikipedia). The :xD:^k ops. commute; therefore, the commutator reduces to the -log(x) term.
Also the n-th row corresponds to the expansion of d[(xD)!/(xD-n)!]/d(xD) = d[:xD:^n]/d(xD) in the operators :xD:^k, or, equivalently, the coefficients of x in d[z!/(z-n)!]/dz=d[St1(n,z)]]/dz evaluated umbrally with z=St2(.,x), i.e., z^n replaced by St2(n,x), where St1(n,x) and St2(n,x) are the signed and unsigned Stirling polynomials of the first (A008275) and second (A008277) kinds. The derivatives of the unsigned St1 are A028421. See examples. This formalism follows from the relations between the raising and lowering operators presented in the MathOverflow link and the Pincherle derivative. The results can be generalized through the operator relations in A094638, which are related to the celebrated Witt Lie algebra and pseudodifferential operators / symbols, to encompass other integral arrays.
A002741(n)*(-1)^(n+1) (row sums), A002104(n)*(-1)^(n+1) (alternating row sums). Column sequences: A133942(n-1), A001048(n-1), A238474, ... - Wolfdieter Lang, Mar 01 2014
Add an additional head row of zeros to the lower triangular array and denote it as T (with initial indexing in columns and rows being 0). Let dP = A132440, the infinitesimal generator for the Pascal matrix, and I, the identity matrix, then exp(T)=I+dP, i.e., T=log(I+dP). Also, (T_n)^n=0, where T_n denotes the n X n submatrix, i.e., T_n is nilpotent of order n. - Tom Copeland, Mar 01 2014
Any pair of lowering and raising ops. L p(n,x) = n·p(n-1,x) and R p(n,x) = p(n+1,x) satisfy [L,R]=1 which implies (RL)^n = St2(n,:RL:), and since (St2(·,u))!/(St2(·,u)-n)!= u^n, when evaluated umbrally, d[(RL)!/(RL-n)!]/d(RL) = d[:RL:^n]/d(RL) is well-defined and gives A238363 when the LHS is reduced to a sum of :RL:^k terms, exactly as for L=d/dx and R=x above. (Note that R_x above is a raising op. different from x, with associated L_x=-xD.) - Tom Copeland, Mar 02 2014
For relations to colored forests, disposition of flags on flagpoles, and the colorings of the vertices of the complete graphs K_n, encoded in their chromatic polynomials, see A130534. - Tom Copeland, Apr 05 2014
The unsigned triangle, omitting the main diagonal, gives A211603. See also A092271. Related to the infinitesimal generator of A008290. - Peter Bala, Feb 13 2017

Examples

			The first few row polynomials are
p(1,x)=  1
p(2,x)= -1 + 2x
p(3,x)=  2 - 3x + 3x^2
p(4,x)= -6 + 8x - 6x^2 + 4x^3
p(5,x)= 24 -30x +20x^2 -10x^3 + 5x^4
...........
For n=3: z!/(z-3)!=z^3-3z^2+2z=St1(3,z) with derivative 3z^2-6z+2, and
3·St2(2,x)-6·St2(1,x)+2=3(x^2+x)-6x+2=3x^2-3x+2=p(3,x). To see the relation to the operator formalism, note that (xD)^k=St2(k,:xD:) and (xD)!/(xD-k)!=[St2(·,:xD:)]!/[St2(·,:xD:)-k]!= :xD:^k.
The triangle a(n,k) begins:
n\k       0       1       2      3      4     5      6    7   8   9 ...
1:        1
2:       -1       2
3:        2      -3       3
4:       -6       8      -6      4
5:       24     -30      20    -10      5
6:     -120     144     -90     40    -15     6
7:      720    -840     504   -210     70   -21      7
8:    -5040    5760   -3360   1344   -420   112    -28    8
9:    40320  -45360   25920 -10080   3024  -756    168  -36   9
10: -362880  403200 -226800  86400 -25200  6048  -1260  240 -45  10
... formatted by _Wolfdieter Lang_, Mar 01 2014
-----------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := (-1)^(n-k-1)*n!/((n-k)*k!); Table[a[n, k], {n, 1, 10}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Jul 09 2015 *)

Formula

a(n,k) = (-1)^(n-k-1)*n!/((n-k)*k!) for k=0 to (n-1).
E.g.f.: log(1+t)*exp(x*t).
E.g.f.for unsigned array: -log(1-t)*exp(x*t).
The lowering op. for the row polynomials is L=d/dx, i.e., L p(n,x) = n*p(n-1,x).
An e.g.f. for an unsigned related version is -log(1+t)*exp(x*t)/t= exp(t*s(·,x)) with s(n,x)=(-1)^n * p(n+1,-x)/(n+1). Let L=d/dx and R= x-(1/((1-D)log(1-D))+1/D),then R s(n,x)= s(n+1,x) and L s(n,x)= n*s(n-1,x), defining a special Sheffer sequence of polynomials, an Appell sequence. So, R (-1)^(n-1) p(n,-x)/n = (-1)^n p(n+1,-x)/(n+1).
From Tom Copeland, Apr 17 2014: (Start)
Dividing each diagonal by its first element (-1)^(n-1)*(n-1)! yields the reverse of A104712.
Multiply each n-th diagonal of the Pascal lower triangular matrix by x^n and designate the result as A007318(x) = P(x). Then with dP = A132440, M = padded A238363 = A238385-I, I = identity matrix, and (B(.,x))^n = B(n,x) = the n-th Bell polynomial Bell(n,x) of A008277,
A) P(x)= exp(x*dP) = exp[x*(e^M-I)] = exp[M*B(.,x)] = (I+dP)^B(.,x), and
B) P(:xD:)=exp(dP:xD:)=exp[(e^M-I):xD:]=exp[M*B(.,:xD:)]=exp[M*xD]=
(1+dP)^(xD) with action P(:xD:)g(x) = exp(dP:xD:)g(x) = g[(I+dP)*x].
C) P(x)^m = P(m*x). P(2x) = A038207(x) = exp[M*B(.,2x)], face vectors of n-D hypercubes. (End)
From Tom Copeland, Apr 26 2014: (Start)
M = padded A238363 = A238385-I
A) = [St1]*[dP]*[St2] = [padded A008275]*A132440*A048993
B) = [St1]*[dP]*[St1]^(-1)
C) = [St2]^(-1)*[dP]*[St2]
D) = [St2]^(-1)*[dP]*[St1]^(-1),
where [St1]=padded A008275 just as [St2]=A048993=padded A008277.
E) P(x) = [St2]*exp(x*M)*[St1] = [St2]*(I + dP)^x*[St1].
F) exp(x*M) = [St1]*P(x)*[St2] = (I + dP)^x,
where (I + dP)^x = sum(k>=0, C(x,k)*dP^k).
Let the row vector Rv=(c0 c1 c2 c3 ...) and the column vector Cv(x)=(1 x x^2 x^3 ...)^Transpose. Form the power series V(x)= Rv * Cv(x) and W(y) := V(x.) evaluated umbrally with (x.)^n = x_n = (y)_n = y!/(y-n)!. Then
G) U(:xD:) = dV(:xD:)/d(xD) = dW(xD)/d(xD) evaluated with (xD)^n = Bell(n,:xD:),
H) U(x) = dV(x.)/dy := dW(y)/dy evaluated with y^n=y_n=Bell(n,x), and
I) U(x) = Rv * M * Cv(x). (Cf. A132440, A074909.) (End)
The Bernoulli polynomials Ber_n(x) are related to the polynomials q_n(x) = p(n+1,x) / (n+1) with the e.g.f. [log(1+t)/t] e^(xt) (cf. s_n (x) above) as Ber_n(x) = St2_n[q.(St1.(x))], umbrally, or [St2]*[q]*[St1], in matrix form. Since q_n(x) is an Appell sequence of polynomials, q_n(x) = [log(1+D_x)/D_x]x^n. - Tom Copeland, Nov 06 2016

Extensions

Pincherle formalism added by Tom Copeland, Feb 27 2014
Previous Showing 11-20 of 114 results. Next