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.

Showing 1-7 of 7 results.

A004070 Table of Whitney numbers W(n,k) read by antidiagonals, where W(n,k) is maximal number of pieces into which n-space is sliced by k hyperplanes, n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 4, 1, 1, 2, 4, 7, 5, 1, 1, 2, 4, 8, 11, 6, 1, 1, 2, 4, 8, 15, 16, 7, 1, 1, 2, 4, 8, 16, 26, 22, 8, 1, 1, 2, 4, 8, 16, 31, 42, 29, 9, 1, 1, 2, 4, 8, 16, 32, 57, 64, 37, 10, 1, 1, 2, 4, 8, 16, 32, 63, 99, 93, 46, 11, 1, 1, 2, 4, 8, 16, 32, 64, 120, 163
Offset: 0

Views

Author

Keywords

Comments

As a number triangle, this is given by T(n,k)=sum{j=0..n, C(n,j)(-1)^(n-j)sum{i=0..j, C(j+k,i-k)}}. - Paul Barry, Aug 23 2004
As a number triangle, this is the Riordan array (1/(1-x), x(1+x)) with T(n,k)=sum{i=0..n, binomial(k,i-k)}. Diagonal sums are then A023434(n+1). - Paul Barry, Feb 16 2005
Form partial sums across rows of square array of binomial coefficients A026729; see also A008949. - Philippe Deléham, Aug 28 2005
Square array A026729 -> Partial sums across rows
1 0 0 0 0 0 0 . . . . 1 1 1 1 1 1 1 . . . . . .
1 1 0 0 0 0 0 . . . . 1 2 2 2 2 2 2 . . . . . .
1 2 1 0 0 0 0 . . . . 1 3 4 4 4 4 4 . . . . . .
1 3 3 1 0 0 0 . . . . 1 4 7 8 8 8 8 . . . . . .
For other Whitney numbers see A007799.
W(n,k) is the number of length k binary sequences containing no more than n 1's. - Geoffrey Critzer, Mar 15 2010
From Emeric Deutsch, Jun 15 2010: (Start)
Viewed as a number triangle, T(n,k) is the number of internal nodes of the Fibonacci tree of order n+2 at level k. A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
(End)
Named after the American mathematician Hassler Whitney (1907-1989). - Amiram Eldar, Jun 13 2021

Examples

			Table W(n,k) begins:
  1 1 1 1  1  1  1 ...
  1 2 3 4  5  6  7 ...
  1 2 4 7 11 16 22 ...
  1 2 4 8 15 26 42 ...
W(2,4) = 11 because there are 11 length 4 binary sequences containing no more than 2 1's: {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 1, 0, 0}. - _Geoffrey Critzer_, Mar 15 2010
Table T(n, k) begins:
  1
  1  1
  1  2  1
  1  2  3  1
  1  2  4  4  1
  1  2  4  7  5  1
  1  2  4  8 11  6  1
...
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Cf. A007799. As a triangle, mirror A052509.
Rows converge to powers of two (A000079). Subdiagonals include A000225, A000295, A002662, A002663, A002664, A035038, A035039, A035040, A035041, A035042. Antidiagonal sums are A000071.

Programs

  • Mathematica
    Transpose[ Table[Table[Sum[Binomial[n, k], {k, 0, m}], {m, 0, 15}], {n, 0, 15}]] // Grid (* Geoffrey Critzer, Mar 15 2010 *)
    T[ n_, k_] := Sum[ Binomial[n, j] (-1)^(n - j) Sum[ Binomial[j + k, i - k], {i, 0, j}], {j, 0, n}]; (* Michael Somos, May 31 2016 *)
  • PARI
    /* array read by antidiagonals up coordinate index functions */
    t1(n) = binomial(floor(3/2 + sqrt(2+2*n)), 2) - (n+1); /* A025581 */
    t2(n) = n - binomial(floor(1/2 + sqrt(2+2*n)), 2); /* A002262 */
    /* define the sequence array function for A004070 */
    W(n, k) = sum(i=0, n, binomial(k, i));
    /* visual check ( origin 0,0 ) */
    printp(matrix(7, 7, n, k, W(n-1, k-1)));
    /* print the sequence entries by antidiagonals going up ( origin 0,0 ) */
    print1("S A004070 "); for(n=0, 32, print1(W(t1(n), t2(n))","));
    print1("T A004070 "); for(n=33, 61, print1(W(t1(n), t2(n))","));
    print1("U A004070 "); for(n=62, 86, print1(W(t1(n), t2(n))",")); /* Michael Somos, Apr 28 2000 */
    
  • PARI
    T(n, k)=sum(m=0, n-k, binomial(k, m)) \\ Jianing Song, May 30 2022

Formula

W(n, k) = Sum_{i=0..n} binomial(k, i). - Bill Gosper
W(n, k) = if k=0 or n=0 then 1 else W(n, k-1)+W(n-1, k-1). - David Broadhurst, Jan 05 2000
The table W(n,k) = A000012 * A007318(transform), where A000012 = (1; 1,1; 1,1,1; ...). - Gary W. Adamson, Nov 15 2007
E.g.f. for row n: (1 + x + x^2/2! + ... + x^n/n!)* exp(x). - Geoffrey Critzer, Mar 15 2010
G.f.: 1 / (1 - x - x*y*(1 - x^2)) = Sum_{0 <= k <= n} x^n * y^k * T(n, k). - Michael Somos, May 31 2016
W(n, n) = 2^n. - Michael Somos, May 31 2016
From Jianing Song, May 30 2022: (Start)
T(n, 0) = T(n, n) = 1 for n >= 0; T(n, k) = T(n-1, k-1) + T(n-2, k-1) for k=1, 2, ..., n-1, n >= 2.
T(n, k) = Sum_{m=0..n-k} binomial(k, m).
T(n,k) = 2^k for 0 <= k <= floor(n/2). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2000

A178523 The path length of the Fibonacci tree of order n.

Original entry on oeis.org

0, 0, 2, 6, 16, 36, 76, 152, 294, 554, 1024, 1864, 3352, 5968, 10538, 18478, 32208, 55852, 96420, 165800, 284110, 485330, 826752, 1404816, 2381616, 4029216, 6803666, 11468502, 19300624, 32433204, 54426364, 91216184, 152691702, 255313658, 426460288, 711634648
Offset: 0

Views

Author

Emeric Deutsch, Jun 15 2010

Keywords

Comments

A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node. The path length of a tree is the sum of the levels of all of its nodes.
This is also the number of configurations of n indistinguishable pairs placed on the vertices of the ladder graph P_2 X P_n such that all but one such pair are joined by an edge; equivalently the number of "(n-1)-domino" configurations in the game of memory played on a 2 X n rectangular array, see [Young]. - Donovan Young, Oct 23 2018

Examples

			a(2)=2 because the Fibonacci tree of order 2 is /\ with path length 1 + 1. - _Emeric Deutsch_, Sep 13 2010
		

References

  • Ralph P. Grimaldi, Properties of Fibonacci trees, In Proceedings of the Twenty-second Southeastern Conference on Combinatorics, Graph Theory, and Computing (Baton Rouge, LA, 1991); Congressus Numerantium 84 (1991), 21-32. - Emeric Deutsch, Sep 13 2010
  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • GAP
    a:=[0,2];;  for n in [3..35] do a[n]:=a[n-1]+a[n-2]+ 2*Fibonacci(n +1) -2; od; Concatenation([0],a); # Muniru A Asiru, Oct 23 2018
    
  • Magma
    [2+(2/5)*(4*n-9)*Fibonacci(n)+(2/5)*(3*n-5)*Fibonacci(n-1): n in [0..40]]; // Vincenzo Librandi, Oct 24 2018
    
  • Maple
    with(combinat): a := proc (n) options operator, arrow: 2+((8/5)*n-18/5)*fibonacci(n)+((6/5)*n-2)*fibonacci(n-1) end proc: seq(a(n), n = 0 .. 35);
    G := 2*z^2/((1-z)*(1-z-z^2)^2): Gser := series(G, z = 0, 40): seq(coeff(Gser, z, n), n = 0 .. 35);
  • Mathematica
    Table[2 +2/5 (4n-9) Fibonacci[n] +2/5 (3n -5) Fibonacci[n-1], {n, 0, 40}] (* or *) LinearRecurrence[{3, -1, -3, 1, 1}, {0, 0, 2, 6, 16}, 40] (* Harvey P. Dale, Oct 02 2016 *)
  • PARI
    vector(40, n, n--; (10+(8*n-18)*fibonacci(n)+(6*n-10)*fibonacci(n-1))/5) \\ G. C. Greubel, Jan 31 2019
    
  • Sage
    [(10+(8*n-18)*fibonacci(n)+(6*n-10)*fibonacci(n-1))/5 for n in range(40)] # G. C. Greubel, Jan 31 2019

Formula

a(n) = 2 + (2/5)*(4n-9)*F(n) + (2/5)*(3n-5)*F(n-1), where F(n) = A000045(n) (Fibonacci numbers).
a(n) = 2*A006478(n+1).
a(n) = Sum_{k=0..n-1} k*A178522(n,k).
G.f.: 2*z^2/((1-z)*(1-z-z^2)^2).
From Emeric Deutsch, Sep 13 2010: (Start)
a(0)=a(1)=0, a(n) = a(n-1)+a(n-2)+2F(n+1)-2 if n>=2; here F(j)=A000045(j) are the Fibonacci numbers (see the Grimaldi reference, Eq. (**) on p. 23).
An explicit formula for a(n) is given in the Grimaldi reference (Theorem 2).
(End)
E.g.f.: 2*exp(x) + 2*exp(x/2)*(5*(4*x - 5)*cosh(sqrt(5)*x/2) + sqrt(5)*(10*x - 13)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Dec 04 2023

A059250 Square array read by antidiagonals: T(k,n) = binomial(n-1, k) + Sum_{i=0..k} binomial(n, i), k >= 1, n >= 0.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 4, 6, 1, 2, 4, 8, 8, 1, 2, 4, 8, 14, 10, 1, 2, 4, 8, 16, 22, 12, 1, 2, 4, 8, 16, 30, 32, 14, 1, 2, 4, 8, 16, 32, 52, 44, 16, 1, 2, 4, 8, 16, 32, 62, 84, 58, 18, 1, 2, 4, 8, 16, 32, 64, 114, 128, 74, 20, 1, 2, 4, 8, 16, 32, 64, 126, 198, 186, 92, 22, 1, 2, 4, 8, 16, 32, 64
Offset: 1

Views

Author

N. J. A. Sloane, Feb 15 2001

Keywords

Comments

T(k,n) = maximal number of regions into which k-space can be divided by n hyperspheres (k >= 1, n >= 0).
For all fixed k, the sequences T(k,n) are complete. - Frank M Jackson, Jan 26 2012
T(k-1,n) is also the number of regions created by n generic hyperplanes through the origin in k-space (k >= 2). - Kent E. Morrison, Nov 11 2017

Examples

			Array begins
  1, 2, 4, 6,  8, 10, 12, ...
  1, 2, 4, 8, 14, 22, ...
  1, 2, 4, 8, 16, ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 73, Problem 4.

Crossrefs

Cf. A014206 (dim 2), A046127 (dim 3), A059173 (dim 4), A059174 (dim 5).
Apart from border, same as A059214. If the k=0 row is included, same as A178522.

Programs

  • Mathematica
    getvalue[n_, k_] := If[n==0, 1, Binomial[n-1, k]+Sum[Binomial[n, i],{i, 0,k}]]; lexicographicLattice[{dim_, maxHeight_}] := Flatten[Array[Sort@Flatten[(Permutations[#1] &) /@     IntegerPartitions[#1 + dim - 1, {dim}], 1] &, maxHeight], 1]; pairs=lexicographicLattice[{2, 13}]-1; Table[getvalue[First[pairs[[j]]], Last[pairs[[j]]]+1], {j, 1, Length[pairs]}] (* Frank M Jackson, Mar 16 2013 *)

Formula

T(k,n) = 2 * Sum_{i=0..k-1} binomial(n-1, i), k >= 1, n >= 1. - Kent E. Morrison, Nov 11 2017

Extensions

Corrected and edited by N. J. A. Sloane, Aug 31 2011, following a suggestion from Frank M Jackson

A059214 Square array T(k,n) = C(n-1,k) + Sum_{i=0..k} C(n,i) read by antidiagonals (k >= 1, n >= 1).

Original entry on oeis.org

2, 2, 4, 2, 4, 6, 2, 4, 8, 8, 2, 4, 8, 14, 10, 2, 4, 8, 16, 22, 12, 2, 4, 8, 16, 30, 32, 14, 2, 4, 8, 16, 32, 52, 44, 16, 2, 4, 8, 16, 32, 62, 84, 58, 18, 2, 4, 8, 16, 32, 64, 114, 128, 74, 20, 2, 4, 8, 16, 32, 64, 126, 198, 186, 92, 22, 2, 4, 8, 16, 32, 64
Offset: 1

Views

Author

N. J. A. Sloane, Feb 15 2001

Keywords

Comments

For k > 1, gives maximal number of regions into which k-space can be divided by n hyperspheres.
The maximum number of subsets of a set of n points in k-space that can be formed by intersecting it with a hyperplane. - Günter Rote, Dec 18 2018

Examples

			Array begins
   2 4 6  8 10 12 ...
   2 4 8 14 22 32 ...
   2 4 8 16 30 52 ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 73, Problem 4.

Crossrefs

Cf. A014206 (dim 2), A046127 (dim 3), A059173 (dim 4), A059174 (dim 5).
Equals twice A216274.
Apart from left border, same as A059250. A178522 is probably the best version.

Programs

  • Mathematica
    A059214[k_,n_]:=Binomial[n-1,k]+Sum[Binomial[n,i],{i,0,k}];
    Table[A059214[k-n+1,n],{k,10},{n,k}] (* Paolo Xausa, Dec 29 2023 *)

Formula

T(k,n) = C(n-1, k) + Sum_{i=0..k} C(n, i).

A178524 Triangle read by rows: T(n,k) is the number of leaves at level k in the Fibonacci tree of order n (n>=0, 0<=k<=n-1).

Original entry on oeis.org

1, 1, 0, 2, 0, 1, 2, 0, 0, 3, 2, 0, 0, 1, 5, 2, 0, 0, 0, 4, 7, 2, 0, 0, 0, 1, 9, 9, 2, 0, 0, 0, 0, 5, 16, 11, 2, 0, 0, 0, 0, 1, 14, 25, 13, 2, 0, 0, 0, 0, 0, 6, 30, 36, 15, 2, 0, 0, 0, 0, 0, 1, 20, 55, 49, 17, 2, 0, 0, 0, 0, 0, 0, 7, 50, 91, 64, 19, 2, 0, 0, 0, 0, 0, 0, 1, 27, 105, 140, 81, 21, 2
Offset: 0

Views

Author

Emeric Deutsch, Jun 15 2010

Keywords

Comments

A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
Sum of entries in row n is the Fibonacci number F(n+1) (A000045(n+1)).
Sum(k*T(n,k),k>=0)=A067331(n-2).
T(n,k) is the number of vertices in the Fibonacci cube G_{n-1} that have eccentricity k (see Klavzar and Mollard reference). - Michel Mollard, Aug 20 2014

Examples

			Triangle starts:
1,
1,
0, 2,
0, 1, 2,
0, 0, 3, 2,
0, 0, 1, 5, 2,
0, 0, 0, 4, 7, 2,
0, 0, 0, 1, 9, 9, 2,
0, 0, 0, 0, 5, 16, 11, 2,
0, 0, 0, 0, 1, 14, 25, 13, 2,
0, 0, 0, 0, 0, 6, 30, 36, 15, 2,
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • Maple
    G := (1+z-t*z)/(1-t*z-t*z^2): Gser := simplify(series(G, z = 0, 17)): for n from 0 to 15 do P[n] := sort(coeff(Gser, z, n)) end do: 1; for n to 13 do seq(coeff(P[n], t, k), k = 0 .. n-1) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = (1+z-t*z) / (1-t*z-t*z^2).

A180566 Triangle read by rows: T(n,k) is the number of unordered pairs of nodes at distance k in the Fibonacci tree of order n (entries in row n are the coefficients of the corresponding Wiener polynomial).

Original entry on oeis.org

2, 1, 4, 4, 2, 8, 10, 8, 6, 4, 14, 19, 20, 18, 18, 12, 4, 24, 34, 40, 44, 48, 46, 40, 20, 4, 40, 58, 72, 88, 106, 114, 122, 112, 76, 28, 4, 66, 97, 124, 160, 208, 242, 284, 310, 308, 244, 128, 36, 4, 108, 160, 208, 276, 376, 466, 576, 686, 782, 812, 720, 472, 196, 44, 4, 176
Offset: 2

Views

Author

Emeric Deutsch, Sep 14 2010

Keywords

Comments

A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
Row n (n>=3) contains 2n-3 entries.
Sum of entries of row n is (F(n+1) - 1)(2F(n+1) - 1), where F(j)=A000045(j) are the Fibonacci numbers.
T(n,1) = 2*F(n+1)-2 = number of edges in the Fibonacci tree of order n.
Sum(k*T(n,k), k>=0) = A180567 (the Wiener index of the Fibonacci tree of order n).

Examples

			T(2,2)=1 because in the Fibonacci tree of order 2, namely /\, there is only 1 pair of nodes at distance 2 (the two leaves).
Triangle starts:
2,1;
4,4,2;
8,10,8,6,4;
14,19,20,18,18,12,4;
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • Maple
    G := (1-t*z+t*z^2)/((1-z)*(1-t*z-t*z^2)): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 20 do r[n] := sort(coeff(Gser, z, n)) end do: w[0] := 0: w[1] := 0: for n from 2 to 15 do w[n] := sort(expand(w[n-1]+w[n-2]+t*r[n-1]+t*r[n-2]+t^2*r[n-1]*r[n-2])) end do: 2, 1; for n from 3 to 10 do seq(coeff(w[n], t, j), j = 1 .. 2*n-3) end do; # yields sequence in triangular form

Formula

The Wiener polynomial w(n,t) of the Fibonacci tree of order n satisfies the recurrence relation w(n,t)=w(n-1,t) + w(n-2,t) + t*r(n-1,t) + t*r(n-2,t) + t^2*r(n-1,t)*r(n-2,t), w(0,t)=w(1,t)=0, where r(n,t) is the generating polynomial of the nodes of the Fibonacci tree of order n with respect to the level of the nodes (for example, 1+2t for the tree /\; see A178522 and the Maple program).

A180567 The Wiener index of the Fibonacci tree of order n.

Original entry on oeis.org

0, 0, 4, 18, 96, 374, 1380, 4696, 15336, 48318, 148448, 446890, 1324104, 3872656, 11206764, 32143818, 91509120, 258855006, 728211180, 2038815272, 5684262480, 15789141750, 43712852544, 120663667538, 332191809936, 912339490464
Offset: 0

Views

Author

Emeric Deutsch, Sep 14 2010

Keywords

Comments

A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
The Wiener index of a connected graph is the sum of the distances between all unordered pairs of nodes in the graph.

Examples

			a(2)=4 because in the tree /\ we have 3 distances: 1, 1, and 2.
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • Maple
    G := (1-t*z+t*z^2)/((1-z)*(1-t*z-t*z^2)): Gser := simplify(series(G, z = 0, 38)): for n from 0 to 35 do r[n] := sort(coeff(Gser, z, n)) end do: w[0] := 0: w[1] := 0: for n from 2 to 30 do w[n] := sort(expand(w[n-1]+w[n-2]+t*r[n-1]+t*r[n-2]+t^2*r[n-1]*r[n-2])) end do: seq(subs(t = 1, diff(w[n], t)), n = 0 .. 27);

Formula

a(n) = Sum(k*A180566(n,k), k>=0).
The Wiener polynomial w(n,t) of the Fibonacci tree of order n satisfies the recurrence relation w(n,t)=w(n-1,t) + w(n-2,t) + t*r(n-1,t) + t*r(n-2,t) + t^2*r(n-1,t)*r(n-2,t), w(0,t)=w(1,t)=0, where r(n,t) is the generating polynomial of the nodes of the Fibonacci tree of order n with respect to the level of the nodes (for example, 1+2t for the tree /\; see A178522). The Wiener index is the derivative of w(n,t) with respect to t, evaluated at t=1 (see the Maple program).
Empirical G.f.: -2*x^2*(x^7-2*x^6-6*x^5+6*x^4+6*x^3-8*x^2+3*x-2)/((x+1)^2*(x^2-3*x+1)^2*(x^2+x-1)^2). [Colin Barker, Nov 17 2012]
Showing 1-7 of 7 results.