A274942 Erroneous version of A129860.
1, 1, 1, 2, 2, 4, 6, 12, 18, 41, 66, 154, 265, 628, 1132, 2748, 5098, 12444
Offset: 3
Keywords
References
- Joseph Felsenstein, Inferring Phylogenies. Sinauer Associates, Inc., 2004, p. 33.
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.
The 4 trees with 6 nodes are: ._._._._._. . ._._._._. . ._._._._. . ._._._. . . . . . . . . | . . . . . . | . . . . | | G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 4*x^6 + 6*x^7 + 11*x^8 + ...
(* c = A001190 *) c[n_?OddQ] := c[n] = Sum[c[k]*c[n-k], {k, 1, (n-1)/2}]; c[n_?EvenQ] := c[n] = (1/2)*c[n/2]*(c[n/2] + 1) + Sum[c[k]*c[n-k], {k, 1, n/2-1}]; c[0] = 0; c[1] = 1; b[x_] := If[IntegerQ[x], c[x+1], 0]; a[0] = a[1] = a[2] = 1; a[n_] := b[n/2] - (1/3)*(b[(n-1)/3]-1)*b[(n-1)/3]*(b[(n-1)/3] + 1) + 2*b[n] - b[n+1] - Sum[(1/2)*(b[i]-1)*b[i]*b[-2*i + n - 1], {i, 1, (n-2)/2}] + Sum[b[i]*Sum[b[j]*b[n-i-j-1], {j, i, (1/2)*(n-i-1)}], {i, 1, (n-1)/3}]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 19 2015 *) n = 50; (* algorithm from Rains and Sloane *) S2[f_,h_,x_] := f[h,x]^2/2 + f[h,x^2]/2; S3[f_,h_,x_] := f[h,x]^3/6 + f[h,x] f[h,x^2]/2 + f[h,x^3]/3; T[-1,z_] := 1; T[h_,z_] := T[h,z] = Table[z^k, {k,0,n}].Take[CoefficientList[z^(n+1) + 1 + S2[T,h-1,z]z, z], n+1]; Sum[Take[CoefficientList[z^(n+1) + S3[T,h-1,z]z - S3[T,h-2,z]z - (T[h-1,z] - T[h-2,z]) (T[h-1,z]-1),z], n+1], {h,1,n/2}] + PadRight[{1,1}, n+1] + Sum[Take[CoefficientList[z^(n+1) + (T[h,z] - T[h-1,z])^2/2 + (T[h,z^2] - T[h-1,z^2])/2, z],n+1], {h,0,n/2}] (* Robert A. Russell, Sep 15 2018 *) n = 60; c[n_?OddQ] := c[n] = Sum[c[k]*c[n-k], {k,1,(n-1)/2}]; c[n_?EvenQ] := c[n] = (1/2)*c[n/2]*(c[n/2] + 1) + Sum[c[k]*c[n-k], {k,1,n/2-1}]; c[0] = 0; c[1] = 1; (* as in program 1 above *) gf[x_] := Sum[c[i+1] x^i, {i,0,n}]; (* g.f. for A001190(n+1) *) ci[x_] := SymmetricGroupIndex[3, x] /. x[i_] -> gf[x^i]; CoefficientList[Normal[Series[gf[x] - (gf[x]^2 - gf[x^2])/2 + x ci[x], {x,0,n}]], x] (* Robert A. Russell, Jan 17 2023 *)
Triangle begins: 1; 0, 1; 0, 1, 1; 0, 1, 2, 1; 0, 1, 4, 6, 3; 0, 1, 10, 30, 36, 15; 0, 2, 27, 140, 310, 300, 105; 0, 2, 74, 663, 2376, 3990, 3150, 945; 0, 4, 226, 3186, 17304, 44850, 59805, 39690, 10395; ...
\\ here U(n,k) is column k of A339649 as a vector. R(n, k)={my(v=vector(n)); v[1]=k; for(n=2, n, v[n]=sum(j=1, (n-1)\2, v[j]*v[n-j]) + if(n%2, 0, binomial(v[n/2]+1, 2))); v} U(n, k)={my(g=x*Ser(R(n, k))); Vec(1 + g + (subst(g + O(x*x^(n\3)), x, x^3) - g^3)/3)} M(n, m=n)={my(v=vector(m+1, k, U(n, k-1)~)); Mat(vector(m+1, k, k--; sum(i=0, k, (-1)^(k-i)*binomial(k, i)*v[1+i])))} {my(T=M(10)); for(n=1, #T~, print(T[n, ][1..n]))}
Array begins: ====================================================== n\k| 0 1 2 3 4 5 6 7 ---+-------------------------------------------------- 0 | 1 1 1 1 1 1 1 1 ... 1 | 0 1 2 3 4 5 6 7 ... 2 | 0 1 3 6 10 15 21 28 ... 3 | 0 1 4 10 20 35 56 84 ... 4 | 0 1 6 21 55 120 231 406 ... 5 | 0 1 12 63 220 600 1386 2842 ... 6 | 0 2 31 227 1040 3530 9772 23366 ... 7 | 0 2 78 891 5480 23250 77112 214718 ... 8 | 0 4 234 3876 31420 165510 655599 2122099 ... 9 | 0 6 722 17790 190360 1243825 5878446 22102577 ... ...
\\ here U(n,k) gives column k as a vector. R(n, k)={my(v=vector(n)); v[1]=k; for(n=2, n, v[n]=sum(j=1, (n-1)\2, v[j]*v[n-j]) + if(n%2, 0, binomial(v[n/2]+1, 2))); v} U(n, k)={my(g=x*Ser(R(n,k))); Vec(1 + g + (subst(g + O(x*x^(n\3)), x, x^3) - g^3)/3)} {my(T=Mat(vector(8, k, U(8, k-1)~))); for(n=1, #T~, print(T[n,]))}
my(N=30); U(N,2) - 2*U(N,1) \\ See A339650 for U(n,k). - Andrew Howroyd, Dec 14 2020
Comments