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.

User: Philippe Flajolet

Philippe Flajolet's wiki page.

Philippe Flajolet has authored 6 sequences.

A122949 Number of ordered pairs of permutations generating a transitive group.

Original entry on oeis.org

1, 3, 26, 426, 11064, 413640, 20946960, 1377648720, 114078384000, 11611761920640, 1425189271161600, 207609729886944000, 35419018603306060800, 6996657393055480550400, 1584616114318716544665600, 407930516160959891683584000, 118458533875304716189544448000
Offset: 1

Author

Philippe Flajolet, Oct 25 2006

Keywords

Comments

From Dixon: The sequence is asymptotic to (n!)^2; when divided by n!^2, it has a high-order asymptotic contact with the probability that two randomly chosen permutations generate the symmetric group. Also: a(n)=(n-1)!*A003319(n+1), where A003319 is the number of connected [or indecomposable] permutations. The coefficients in the asymptotic expansion of a(n)/(n!)^2 are A113869 and in absolute value, they constitute A084357 (number of sets of sets of lists).

Examples

			a(2)=3 because there are 2!*2!=4 pairs of permutations, of which only [(1,1),(1,1)] does not generate a transitive group.
		

Crossrefs

Programs

  • Maple
    series(log(add(n!*z^n,n=0..Order+2)),z=0):seq(coeff(%,z,j)*j!,j=0..Order);
  • Mathematica
    max = 15; Drop[ CoefficientList[ Series[ Log[1 + Sum[n!*z^n, {n, 1, max}]], {z, 0, max}], z]* Range[0, max]!, 1](* Jean-François Alcover, Oct 05 2011 *)
  • PARI
    N=20; x='x+O('x^N); Vec(serlaplace(log(sum(k=0, N, k!*x^k)))) \\ Seiichi Manyama, Mar 01 2019

Formula

Exponential generating function is: log(1+Sum_{n>=1}n!*z^n).
a(n) = (n!)^2 - (n-1)! * Sum_{k=1..n-1} a(k) * (n-k)! / (k-1)!. - Ilya Gutkovskiy, Jul 10 2020

Extensions

More terms from Seiichi Manyama, Mar 01 2019

A102866 Number of finite languages over a binary alphabet (set of nonempty binary words of total length n).

Original entry on oeis.org

1, 2, 5, 16, 42, 116, 310, 816, 2121, 5466, 13937, 35248, 88494, 220644, 546778, 1347344, 3302780, 8057344, 19568892, 47329264, 114025786, 273709732, 654765342, 1561257968, 3711373005, 8797021714, 20794198581, 49024480880, 115292809910, 270495295636
Offset: 0

Author

Philippe Flajolet, Mar 01 2005

Keywords

Comments

Analogous to A034899 (which also enumerates multisets of words)

Examples

			a(2) = 5 because the sets are {a,b}, {aa}, {ab}, {ba}, {bb}.
a(3) = 16 because the sets are {a,aa}, {a,ab}, {a,ba}, {a,bb}, {b,aa}, {b,ab}, {b,ba}, {b,bb}, {aaa}, {aab}, {aba}, {abb}, {baa}, {bab}, {bba}, {bbb}.
		

Crossrefs

Column k=2 of A292804.
Row sums of A208741 and of A360634.

Programs

  • Maple
    series(exp(add((-1)^(j-1)/j*(2*z^j)/(1-2*z^j),j=1..40)),z,40);
  • Mathematica
    nn = 20; p = Product[(1 + x^i)^(2^i), {i, 1, nn}]; CoefficientList[Series[p, {x, 0, nn}], x] (* Geoffrey Critzer, Mar 07 2012 *)
    CoefficientList[Series[E^Sum[(-1)^(k-1)/k*(2*x^k)/(1-2*x^k), {k,1,30}], {x, 0, 30}], x] (* Vaclav Kotesovec, Sep 13 2014 *)

Formula

G.f.: exp(Sum((-1)^(j-1)/j*(2*z^j)/(1-2*z^j), j=1..infinity)).
Asymptotics (Gerhold, 2011): a(n) ~ c * 2^(n-1)*exp(2*sqrt(n)-1/2) / (sqrt(Pi) * n^(3/4)), where c = exp( Sum_{k>=2} (-1)^(k-1)/(k*(2^(k-1)-1)) ) = 0.6602994483152065685... . - Vaclav Kotesovec, Sep 13 2014
Weigh transform of A000079. - Alois P. Heinz, Jun 25 2018

A077608 Number of compositions of n into twin primes (i.e., primes that are members of a twin prime pair, like 3, 5, 7, 11, 13, but not 2 or 23).

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 1, 3, 4, 3, 7, 7, 8, 14, 15, 21, 28, 33, 47, 58, 75, 103, 125, 167, 220, 275, 370, 474, 610, 806, 1028, 1347, 1752, 2253, 2954, 3812, 4944, 6451, 8329, 10841, 14077, 18226, 23720, 30745, 39903, 51857, 67214, 87313, 113340, 147017, 190974
Offset: 0

Author

Philippe Flajolet, Nov 11 2002

Keywords

Examples

			a(15) = 8 since 15 = 11+7 = 7+11 = 5+13 = 13+5 = 3+5+7 = 3+7+5 = 5+3+7 = 5+7+3 = 7+3+5 = 7+5+3 and 3,5,7,11 belong to twin pairs.
		

Crossrefs

Programs

  • Maple
    A077608 := proc(n) coeff(series(1/(1-add(z^numtheory[ithprime](j)* subs([true=1,false=0],evalb(isprime(ithprime(j)-2) or isprime(ithprime(j)+2))),j=2..n+2)),z=0,n+1),z,n): end;
  • Mathematica
    a[n_] := Coefficient[Series[ 1/(1 - Sum[z^Prime[j]*Boole[ PrimeQ[Prime[j] - 2] || PrimeQ[ Prime[j] + 2]], {j, 2, n + 2}]), {z, 0, n + 1}], z, n]; Table[a[n], {n, 0, 53}] (* Jean-François Alcover, Nov 09 2012, after Maple *)
  • PARI
    ok(n)={isprime(n) && (isprime(n-2) || isprime(n+2))}
    {my(n=60); Vec(1/(1-sum(k=1, n, if(ok(k), x^k, 0))) + O(x*x^n))} \\ Andrew Howroyd, Dec 28 2017

Formula

G.f.: 1/(1 - Sum_{k>=1} x^A001097(k)). - Andrew Howroyd, Dec 28 2017

A060941 Duchon's numbers: the number of paths of length 5*n from the origin to the line y = 2*x/3 with unit East and North steps that stay below the line or touch it.

Original entry on oeis.org

1, 2, 23, 377, 7229, 151491, 3361598, 77635093, 1846620581, 44930294909, 1113015378438, 27976770344941, 711771461238122, 18293652115906958, 474274581883631615, 12388371266483017545, 325714829431573496525, 8613086428709348334675, 228925936056388155632081
Offset: 0

Author

Philippe Flajolet, May 12 2001

Keywords

Comments

A generalization of the ballot numbers.

Crossrefs

See A293946 for a closely related sequence, also from the Bizley paper.

Programs

  • Magma
    [&+[1/(5*n+i+1)*Binomial(5*n+1, n-i)*Binomial(5*n+2*i, i): i in [0..n]]: n in [0..30]]; // Vincenzo Librandi, Feb 12 2016
  • Maple
    A060941 := n -> hypergeom([-n,5*n/2+1/2,5*n/2+1],[4*n+2,5*n+2],-4)* binomial(5*n,n)/(4*n+1); seq(simplify(A060941(n)),n=0..18); # Peter Luschny, Oct 05 2014
  • Mathematica
    a[n_] := ((5n)!*(5n + 1)!*HypergeometricPFQRegularized[{-n, 5n/2 + 1/2, 5n/2 + 1}, {4n + 2, 5n + 2}, -4])/n!; a /@ Range[0, 16]
    (* Jean-François Alcover, Jun 30 2011, after given formula *)
  • Sage
    A060941 = lambda n : hypergeometric([-n,5*n/2+1/2,5*n/2+1],[4*n+2,5*n+2],-4)*gamma(1+5*n)/(gamma(1+n)*gamma(2+4*n))
    [A060941(n).simplify() for n in range(19)] # Peter Luschny, Oct 05 2014
    

Formula

a(n) = Sum_{i=0..n} 1/(5*n+i+1) * C(5*n+1, n-i) * C(5*n+2*i, i).
a(n) = Sum_{i=0..2*n} (-1)^i/(5*i+1) * C((5*i+1)/2, i) * 1/(1+5*(2*n-i)) * C((1+5*(2*n-i))/2, 2*n-i).
G.f. A(z) satisfies: A(z) = 1+2*z*A^5-z*A^6+z*A^7+z^2*A^10. [Corrected by Bryan T. Ek, Oct 30 2017]
G.f.: A(z) = exp(C(5,2)*z/5 + C(10,4)*z^2/10 + C(15,6)*z^3/15 + ...). - Don Knuth, Oct 05 2014
Recurrence: 216*(n-1)*n*(2*n-1)*(3*n-4)*(3*n-2)*(3*n-1)*(3*n+1)*(6*n-1)*(6*n+1)*(5625*n^4 - 38550*n^3 + 97425*n^2 - 107784*n + 44044)*a(n) = 540*(n-1)*(3*n-4)*(3*n-2)*(126562500*n^10 - 1373625000*n^9 + 6557484375*n^8 - 18192221250*n^7 + 32549973750*n^6 - 39248008800*n^5 + 32203028675*n^4 - 17641491134*n^3 + 6113558828*n^2 - 1191132600*n + 96112128)*a(n-1) - 450*(5*n-9)*(5*n-8)*(5*n-7)*(5*n-6)*(63281250*n^9 - 718453125*n^8 + 3556125000*n^7 - 10046426250*n^6 + 17765816250*n^5 - 20240090325*n^4 + 14698993900*n^3 - 6468702396*n^2 + 1533535184*n - 142988160)*a(n-2) + 78125*(n-2)*(5*n-14)*(5*n-13)*(5*n-12)*(5*n-11)*(5*n-9)*(5*n-8)*(5*n-7)*(5*n-6)*(5625*n^4 - 16050*n^3 + 15525*n^2 - 6084*n + 760)*a(n-3). - Vaclav Kotesovec, Oct 05 2014
Asymptotics (Duchon, 2000): a(n) ~ c * (3125/108)^n / n^(3/2), where c = 0.0876612192439026461763141944768209255550234422281635788... (constant corrected, in the reference "On the enumeration and generation of generalized Dyck words", p.132 is a wrong value 0.0887). - Vaclav Kotesovec, Oct 05 2014, c = sqrt(5*(10^(2/3) - 5^(1/3)/2^(2/3) - 2))/(18*sqrt(Pi)). - Vaclav Kotesovec, Sep 16 2021
a(n) = Gamma(n+4/5)*Gamma(n+3/5)*Gamma(n+2/5)*3125^n*hypergeom([-n, (5/2)*n+1, (5/2)*n+1/2], [5*n+2, 4*n+2], -4)*Gamma(n+1/5)/ (Pi^2*csc((2/5)*Pi)*csc((1/5)*Pi)*Gamma(4*n+2)). - Robert Israel, Oct 05 2014
a(n) = A002294(n)*hypergeom([-n,5*n/2+1/2,5*n/2+1],[4*n+2,5*n+2],-4). - Peter Luschny, Oct 05 2014
O.g.f. A(x) satisfies: A(x)^5 = 1/x*series reversion( x/((1+x)*C(x))^5 ), where C(x) = (1 - sqrt(1 - 4*x))/(2*x) is the o.g.f. for the Catalan numbers A000108. See A001450. - Peter Bala, Oct 05 2015
The sequence defined by b(n) := [x^n] A(x)^n begins [1, 2, 50, 1415, 42258, 1300727, 40820837, 1298493730, ...] and conjecturally satisfies the congruence b(p) == b(1) (mod p^3) for prime p >= 7 (checked up to p = 101). [Added 23 Oct 2024: More generally, let r be an integer and s a positive integer and define a sequence u(n) by u(n) = [x^(s*n)] A(x)^(r*n). Then we conjecture that the supercongruences u(n*p^k) == u(n*p^(k-1)) (mod p^(3*k)) hold for all primes p >= 7 and positive integers n and k.] - Peter Bala, Sep 12 2021
Inductively define a family of sequences {a(i,n) : n >= 0}, i >= 1, by setting a(1,n) = a(n) and, for i >= 2, a(i,n) = [x^n] ( exp(Sum_{k >= 1} a(i-1,k)*x^k/k) )^n. We conjecture that the sequences {a(i,n) : n >= 0}, i >= 2, also satisfy the supercongruences u(n*p^k) == u(n*p^(k-1)) (mod p^(3*k)) for primes p >= 7 and positive integers n and k. - Peter Bala, Oct 24 2024

A054727 Number of forests of rooted trees with n nodes on a circle without crossing edges.

Original entry on oeis.org

1, 2, 7, 33, 181, 1083, 6854, 45111, 305629, 2117283, 14929212, 106790500, 773035602, 5652275723, 41683912721, 309691336359, 2315772552485, 17415395593371, 131632335068744, 999423449413828, 7618960581522348, 58295017292748756, 447517868947619432, 3445923223190363608
Offset: 1

Author

Philippe Flajolet, Apr 20 2000

Keywords

Crossrefs

Row sums of A094021.

Programs

  • Maple
    ZZ:=[F,{F=Union(Epsilon,ZB),ZB=Prod(Z1,P),P=Sequence(B),B=Prod(P,Z1,P),Z1=Prod(Z,F)}, unlabeled]: seq(count(ZZ,size=n),n=1..20); # Zerinvary Lajos, Apr 22 2007
  • Mathematica
    a[n_] := (3*n-3)!/((n-1)!*(2*n-1)!)*HypergeometricPFQ[{1-2*n, 1-n, -n}, {3/2 - 3*n/2, 2 - 3*n/2}, -1/4]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Sep 05 2012, after formula *)
  • PARI
    N=33; x='x+O('x^N); Vec(serreverse(x/((1+x)*(1-sqrt(1-4*x))/(2*x)))) \\ Joerg Arndt, May 25 2016

Formula

a(n) = Sum_{j=1..n} binomial(n, j-1) * binomial(3*n-2*j-1, n-j) / (2*n - j).
G.f. A(x) satisfies 2*A(x)^2=x*(1-sqrt(1-4*A(x)))*(1-A(x)). - Vladimir Kruchinin, Nov 25 2011
From Peter Bala, Nov 07 2015: (Start)
O.g.f. A(x) = revert(x/((1 + x)*C(x))), where C(x) = (1 - sqrt(1 - 4*x))/(2*x) is the o.g.f for the Catalan numbers A000108.
Row sums of A094021. (End)
Conjecture: -2(37*n-80) *(n-1) *(2*n-1) *a(n) +2*(592*n^3-3056*n^2+5045*n-2665) *a(n-1) +2*(148*n^3-986*n^2+2021*n-1255) *a(n-2) -5*(n-5) *(n-2) *(37*n-43) *a(n-3)=0. - R. J. Mathar, Apr 30 2018
a(n) ~ c * d^n / (sqrt(Pi) * n^(3/2)), where d = 8.2246915409778560686084627753... is the real root of the equation 5 - 8*d - 32*d^2 + 4*d^3 = 0 and c = 0.07465927842190452347018812862935237... is the positive real root of the equation -125 + 22376*c^2 + 8880*c^4 + 592*c^6 = 0. - Vaclav Kotesovec, Apr 30 2018

A054726 Number of graphs with n nodes on a circle without crossing edges.

Original entry on oeis.org

1, 1, 2, 8, 48, 352, 2880, 25216, 231168, 2190848, 21292032, 211044352, 2125246464, 21681954816, 223623069696, 2327818174464, 24424842461184, 258054752698368, 2742964283768832, 29312424612462592, 314739971287154688, 3393951437605044224, 36739207546043105280
Offset: 0

Author

Philippe Flajolet, Apr 20 2000

Keywords

Comments

Related to Schröder's second problem.
A001006 gives number of ways of drawing any number of nonintersecting chords between n points on a circle, while this sequence gives number of ways of drawing noncrossing chords between n points on a circle. The difference is that nonintersection chords have no point in common, while noncrossing chords may share an endpoint. - David W. Wilson, Jan 30 2003
For n>0, a(n) = number of lattice paths from (0,0) to (n-1,n-1) that consist of steps (i,j), i,j nonnegative integers not both 0 and that stay strictly below the line y=x except at their endpoints. For example, a(3)=8 counts the paths with following step sequences: {(2, 2)}, {(2, 1), (0, 1)}, {(2, 0), (0, 2)}, {(2, 0), (0, 1), (0, 1)}, {(1, 0), (1, 2)}, {(1, 0), (1, 1), (0, 1)}, {(1, 0), (1, 0), (0, 2)}, {(1, 0), (1, 0), (0, 1), (0, 1)}. If the word "strictly" is replaced by "weakly", the counting sequence becomes A059435. - David Callan, Jun 07 2006
The nodes on the circle are distinguished by their positions but are otherwise unlabeled. - Lee A. Newberg, Aug 09 2011
From Gus Wiseman, Jun 22 2019: (Start)
Conjecture: Also the number of simple graphs with vertices {1..n} not containing any pair of nesting edges. Two edges {a,b}, {c,d} where a < b and c < d are nesting if a < c and b > d or a > c and b < d. For example, the a(0) = 1 through a(3) = 8 non-nesting edge-sets are:
{} {} {} {}
{12} {12}
{13}
{23}
{12,13}
{12,23}
{13,23}
{12,13,23}
(End)

Crossrefs

Sequences related to chords in a circle: A001006, A054726, A006533, A006561, A006600, A007569, A007678. See also entries for chord diagrams in Index file.
Cf. A000108 (non-crossing set partitions), A000124, A006125, A007297 (connected case), A194560, A306438, A324167, A324169 (covering case), A324173, A326210.

Programs

  • Maple
    with(combstruct): br:= {EA = Union(Sequence(EA, card >= 2), Prod(V, Sequence(EA), Sequence(EA))), V=Union(Prod(Z, G)), G=Union(Epsilon, Prod(Z, G), Prod(V,V,Sequence(EA), Sequence(EA), Sequence(Union(Sequence(EA,card>=1), Prod(V,Sequence(EA),Sequence(EA)))))) }; ggSeq := [seq(count([G, br], size=i), i=0..20)];
  • Mathematica
    Join[{a = 1, b = 1}, Table[c = (6*(2*n - 3)*b)/n - (4*(n - 3) a)/n; a = b; b = c, {n, 1, 40}]] (* Vladimir Joseph Stephan Orlovsky, Jul 11 2011 *)
    nn=8;
    croXQ[stn_]:=MatchQ[stn,{_,{_,x_,_,y_,_},_,{_,z_,_,t_,_},_}/;xGus Wiseman, Feb 19 2019 *)
  • PARI
    z='z+O('z^66); Vec( 1+3/2*z-z^2-z/2*sqrt(1-12*z+4*z^2) ) \\ Joerg Arndt, Mar 01 2014

Formula

a(n) = 2^n*A001003(n-2) for n>2.
From Lee A. Newberg, Aug 09 2011: (Start)
G.f.: 1 + (3/2)*z - z^2 - (z/2)*sqrt(1 - 12*z + 4*z^2);
D-finite with recurrence: a(n) = ((12*n-30)*a(n-1) - (4*n-16)*a(n-2)) / (n-1) for n>1. (End)
a(n) ~ 2^(n - 7/4) * (1 + sqrt(2))^(2*n-3) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Oct 11 2012, simplified Dec 24 2017
a(n) = 2^(n-2) * (Legendre_P(n-1, 3) - Legendre_P(n-3, 3))/(2*n - 3) = 2^n * (Legendre_P(n-1, 3) - 3*Legendre_P(n-2, 3))/(4*n - 8), both for n >= 3. - Peter Bala, May 06 2024

Extensions

Offset changed to 0 by Lee A. Newberg, Aug 03 2011