A096984 Another version of A005512, which is the main entry for this sequence.
2, 0, 4, 5, 96, 427, 6448, 56961, 892720, 11905091, 211153944
Offset: 2
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.
G.f. = 1 + x + x^2 + 2*x^4 + 2*x^5 + 4*x^6 + 6*x^7 + 12*x^8 + 20*x^9 + ... From _Gus Wiseman_, Jan 21 2020: (Start) The a(1) = 1 through a(8) = 12 unlabeled topologically series-reduced rooted trees with n nodes (empty n = 3 column shown as dot) are: o (o) . (ooo) (oooo) (ooooo) (oooooo) (ooooooo) ((oo)) ((ooo)) ((oooo)) ((ooooo)) ((oooooo)) (oo(oo)) (oo(ooo)) (oo(oooo)) ((o(oo))) (ooo(oo)) (ooo(ooo)) ((o(ooo))) (oooo(oo)) ((oo(oo))) ((o(oooo))) ((oo(ooo))) ((ooo(oo))) (o(oo)(oo)) (oo(o(oo))) (((oo)(oo))) ((o(o(oo)))) (End)
with(powseries): with(combstruct): n := 30: Order := n+3: sys := {B = Prod(C,Z), S = Set(B,1 <= card), C = Union(Z,S)}: G001678 := (convert(gfseries(sys,unlabeled,x)[S(x)], polynom)) * x^2: G0temp := G001678 + x^2: G001679 := G0temp / x + G0temp - (G0temp^2+eval(G0temp,x=x^2))/(2*x): A001679 := 0,seq(coeff(G001679,x^i),i=1..n); # Ulrich Schimke (ulrschimke(AT)aol.com) # adapted for Maple 16 or higher version by Vaclav Kotesovec, Jun 26 2014
terms = 37; (* F = G001678 *) F[] = 0; Do[F[x] = (x^2/(1 + x))*Exp[Sum[ F[x^k]/(k*x^k), {k, 1, j}]] + O[x]^j // Normal, {j, 1, terms + 1}]; G[x_] = 1 + ((1 + x)/x)*F[x] - (F[x]^2 + F[x^2])/(2*x) + O[x]^terms; CoefficientList[G[x], x] (* Jean-François Alcover, Jan 12 2018 *) urt[n_]:=Join@@Table[Union[Sort/@Tuples[urt/@ptn]],{ptn,IntegerPartitions[n-1]}]; Table[Length[Select[urt[n],Length[#]!=2&&FreeQ[Z@@#,{}]&]],{n,15}] (* _Gus Wiseman, Jan 21 2020 *)
{a(n) = local(A); if( n<3, n>0, A = x / (1 - x^2) + x * O(x^n); for(k=3, n-1, A /= (1 - x^k + x * O(x^n))^polcoeff(A, k)); polcoeff( (1 + x)*A - x*(A^2 + subst(A, x, x^2)) / 2, n))};
From _Gus Wiseman_, Jan 22 2020: (Start) The a(1) = 1 through a(4) = 16 trees (in the format root[branches], empty column shown as dot) are: 1 1[2] . 1[2,3,4] 2[1] 1[2[3,4]] 1[3[2,4]] 1[4[2,3]] 2[1,3,4] 2[1[3,4]] 2[3[1,4]] 2[4[1,3]] 3[1,2,4] 3[1[2,4]] 3[2[1,4]] 3[4[1,2]] 4[1,2,3] 4[1[2,3]] 4[2[1,3]] 4[3[1,2]] (End)
[1] cat [n*Factorial(n-2)*(&+[(-1)^k*Binomial(n,k)*(n-k)^(n-k-2)/Factorial(n-k-2): k in [0..n-2]]): n in [2..20]]; // G. C. Greubel, Mar 07 2020
seq( `if`(n=1, 1, n*(n-2)!*add((-1)^k*binomial(n, k)*(n-k)^(n-k-2)/(n-k-2)!, k=0..n-2)), n=1..20); # G. C. Greubel, Mar 07 2020
f[n_] := If[n < 2, 1, n(n - 2)!Sum[(-1)^k*Binomial[n, k](n - k)^(n - 2 - k)/(n - 2 - k)!, {k, 0, n - 2}]]; Table[ f[n], {n, 19}] (* Robert G. Wilson v, Feb 12 2005 *) sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}]; lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]]; Table[Length[Select[lrt[Range[n]],Length[#]!=2&&FreeQ[Z@@#,Integer[]]&]],{n,6}] (* Gus Wiseman, Jan 22 2020 *)
[1]+[n*factorial(n-2)*sum((-1)^k*binomial(n,k)*(n-k)^(n-k-2)/factorial( n-k-2) for k in (0..n-2)) for n in (2..20)] # G. C. Greubel, Mar 07 2020
a(5) = 85: ...0................0...............0-o... ...|.............../ \............ /|\.... ...o..............o o...........o o o... ../|\............/ \ ................... .o o o..........o o .................. These trees have 20 + 60 + 5 = 85 labelings. From _Gus Wiseman_, Jan 22 2020: (Start) The a(1) = 1 through a(4) = 16 trees (in the format root[branches]) are: 1 1[2] 1[2,3] 1[2,3,4] 2[1] 2[1,3] 1[2[3,4]] 3[1,2] 1[3[2,4]] 1[4[2,3]] 2[1,3,4] 2[1[3,4]] 2[3[1,4]] 2[4[1,3]] 3[1,2,4] 3[1[2,4]] 3[2[1,4]] 3[4[1,2]] 4[1,2,3] 4[1[2,3]] 4[2[1,3]] 4[3[1,2]] (End)
nn = 20; b = 1 + Sum[nn = n; n! Coefficient[Series[(Exp[x] - x)^n, {x, 0, nn}], x^n]*x^n/n!, {n,1, nn}]; c = Sum[a[n] x^n/n!, {n, 0, nn}]; sol = SolveAlways[b == Series[1/(1 - (c - x)), {x, 0, nn}], x]; Flatten[Table[a[n], {n, 0, nn}] /. sol] nn = 30; CoefficientList[Series[1+x-1/Sum[SeriesCoefficient[(E^x-x)^n,{x,0,n}]*x^n,{n,0,nn}],{x,0,nn}],x] * Range[0,nn]! (* Vaclav Kotesovec, Jan 30 2015 *) sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}]; lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]]; Table[Length[Select[lrt[Range[n]],FreeQ[Z@@#,Integer[]]&]],{n,6}] (* Gus Wiseman, Jan 22 2020 *)
The sequence of all topologically series-reduced rooted trees together with their Matula-Goebel numbers begins: 1: o 2: (o) 7: ((oo)) 8: (ooo) 16: (oooo) 19: ((ooo)) 28: (oo(oo)) 32: (ooooo) 43: ((o(oo))) 53: ((oooo)) 56: (ooo(oo)) 64: (oooooo) 76: (oo(ooo)) 98: (o(oo)(oo)) 107: ((oo(oo))) 112: (oooo(oo)) 128: (ooooooo) 131: ((ooooo)) 152: (ooo(ooo)) 163: ((o(ooo)))
nn=1000; primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; srQ[n_]:=Or[n==1,With[{m=primeMS[n]},And[Length[m]>1,And@@srQ/@m]]]; Select[Range[nn],PrimeOmega[#]!=2&&And@@srQ/@primeMS[#]&]
Non-isomorphic representatives of the a(7) = 847 trees (in the format root[branches]) are: 1[2,3,4[5,6,7]] 1[2,3,4,5[6,7]] 1[2,3,4,5,6,7]
lrt[set_]:=If[Length[set]==0,{},Join@@Table[Apply[root,#]&/@Join@@Table[Tuples[lrt/@stn],{stn,sps[DeleteCases[set,root]]}],{root,set}]]; Table[Length[Select[lrt[Range[n]],Length[#]>2&&FreeQ[#,[]]&]],{n,6}]
a(n) = {if(n<=1, 0, sum(k=1, n, (-1)^(n-k)*k^(k-2)*n*(n-2)!*binomial(n-1,k-1)*(2*k*n - n - k^2)/k!))} \\ Andrew Howroyd, Dec 09 2020
seq(n)={my(w=lambertw(-x/(1+x) + O(x*x^n))); Vec(serlaplace(-x - w - (x/2)*w^2), -n)} \\ Andrew Howroyd, Dec 09 2020
Triangle begins: 1; 0, 1; 0, 0, 0; 0, 0, 0, 4; 0, 0, 0, 0, 5; 0, 0, 0, 0, 0, 96; 0, 0, 0, 1, 0, 120, 427; 0, 0, 0, 0, 20, 180, 1260, 6448; 0, 0, 0, 0, 15, 420, 3780, 23520, 56961; ...
\\ See Jackson & Reilly for e.g.f. H(n,y) = {my(A=O(x*x^n)); (exp(y*x/2 - (y*x)^2/4 + A)/sqrt(1 + y*x + A))*sum(k=0, n, ((1 + y)*exp(-y^2*x/(1+y*x) + A))^binomial(k,2) * (x*exp((y^3*x^2 + A)/(2*(1 + y*x))))^k / k!)} T(n) = {Mat([Col(p, -n) | p<-Vec(serlaplace(log(H(n,y + O(y^n)))))])} { my(A=T(10)); for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Jan 24 2020
[1] cat [Factorial(n-1)*(&+[(-1)^k*Binomial(n+1,k)*(n-k+1)^(n-k-1)/((n+1)*Factorial(n-k-1)): k in [0..n-1]]): n in [2..20]] // G. C. Greubel, Mar 08 2020
seq( `if`(n=1, 1, (n-1)!*add((-1)^k*binomial(n+1, k)*(n-k+1)^(n-k-1)/( (n+1)*(n-k-1)!), k = 0..n-1)), n=1..20); # G. C. Greubel, Mar 08 2020
Table[If[n==1, 1, (n-1)!*Sum[(-1)^k*Binomial[n+1,k]*(n-k+1)^(n-k-1)/((n+1)*(n - k-1)!), {k,0,n-1}]], {n, 20}] (* G. C. Greubel, Mar 08 2020 *)
a(n) = if(n==1, 1, (n-1)!*sum(k=0, n-1, (-1)^k*binomial(n+1,k)*(n-k+1 )^(n-k-1)/( (n+1)*(n-k-1)!))); \\ G. C. Greubel, Mar 08 2020
[1]+[factorial(n-1)*sum((-1)^k*binomial(n+1,k)*(n-k+1)^(n-k-1)/( (n+1)*factorial(n-k-1)) for k in (0..n-1)) for n in (2..20)] # G. C. Greubel, Mar 08 2020
Comments