A367076
Irregular triangle read by rows: T(n,k) (0 <= n, 0 <= k < 2^n). T(n,k) = -Sum_{i=0..k} A365968(n,i).
Original entry on oeis.org
0, 1, 0, 3, 4, 3, 0, 6, 10, 12, 12, 12, 10, 6, 0, 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10, 0, 15, 28, 39, 48, 57, 64, 69, 72, 79, 84, 87, 88, 89, 88, 85, 80, 85, 88, 89, 88, 87, 84, 79, 72, 69, 64, 57, 48, 39, 28, 15, 0, 21, 40, 57, 72, 87
Offset: 0
Triangle begins:
k=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
n=0: 0;
n=1: 1, 0;
n=2: 3, 4, 3, 0;
n=3: 6, 10, 12, 12, 12, 10, 6, 0;
n=4; 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10, 0;
-
nmax=10; row[n_]:=Join[CoefficientList[Series[1/(1-x)*Sum[ i/(1+x^2^(i-1))*Product[1+x^2^j,{j,0,i-2}],{i,n}],{x,0,2^n-1}],x],{0}]; Array[row,6,0] (* Stefano Spezia, Dec 23 2023 *)
-
def row_gen(n):
x = 0
for k in range(2**n):
b = bin(k)[2:].zfill(n)
x += sum((-1)**(int(b[n-i])+1)*i for i in range(1,n+1))
yield(-x)
def A367076_row_n(n): return(list(row_gen(n)))
A192020
Triangle read by rows: T(n,k) is the number of unordered pairs of nodes at distance k in the binomial tree of order n (1 <= k <= 2n-1; entries in row n are the coefficients of the corresponding Wiener polynomial).
Original entry on oeis.org
1, 3, 2, 1, 7, 8, 8, 4, 1, 15, 22, 31, 28, 17, 6, 1, 31, 52, 90, 112, 104, 68, 30, 8, 1, 63, 114, 225, 344, 418, 388, 270, 136, 47, 10, 1, 127, 240, 516, 908, 1331, 1568, 1464, 1064, 589, 240, 68, 12, 1, 255, 494, 1123, 2180, 3663, 5138, 5931, 5560, 4181, 2482, 1137, 388, 93, 14, 1
Offset: 0
T(2,1)=3, T(2,2)=2, T(2,3)=1 because the binomial tree b(2) is basically the path tree A-B-R-C and we have 3 (AB, BR, RC), 2 (AR, BC), and 1 (AC) pairs of nodes at distances 1, 2, and 3, respectively.
Triangle starts:
1;
3, 2, 1;
7, 8, 8, 4, 1;
15, 22, 31, 28, 17, 6, 1;
31, 52, 90, 112, 104, 68, 30, 8, 1;
- K. Viswanathan Iyer and K. R. Udaya Kumar Reddy, Wiener index of Binomial trees and Fibonacci trees, Int'l. J. Math. Engin. with Comp., Accepted for publication, Sept. 2009.
- T. H. Cormen, C. E. Leiserson and R. L. Rivest: Introduction to Algorithms. MIT Press / McGraw-Hill (1990).
-
G := 1/(1-z-t*z): Gser := simplify(series(G, z = 0, 11)): for n from 0 to 8 do r[n] := sort(coeff(Gser, z, n)) end do: w[0] := 0: for n to 8 do w[n] := sort(expand(2*w[n-1]+t*r[n-1]^2)) end do: for n to 8 do seq(coeff(w[n], t, k), k = 1 .. 2*n-1) end do; # yields sequence in triangular form
-
max = 8; g = 1/(1 - z - t*z); r = CoefficientList[ Series[g, {z, 0, max}], z]; w[0] = 0; w[n_] := w[n] = 2 w[n-1] + t*r[[n]]^2; Flatten[ Table[ Drop[ CoefficientList[ w[n], t], 1], {n, 1, max}]] (* Jean-François Alcover, Oct 06 2011, after Maple *)
-
a(n) = my(s=sqrtint(n),r=n-s^2); sum(i=0,s, 2^(s-i)*binomial(2*i,r)); \\ Kevin Ryde, Sep 13 2019
Showing 1-2 of 2 results.
Comments