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: Jeffrey Barnett

Jeffrey Barnett's wiki page.

Jeffrey Barnett has authored 6 sequences.

A131890 a(n) is the number of shapes of balanced trees with constant branching factor 4 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.

Original entry on oeis.org

1, 1, 4, 6, 4, 1, 16, 96, 256, 256, 1536, 3456, 3456, 1296, 3456, 3456, 1536, 256, 256, 96, 16, 1, 64, 1536, 16384, 65536, 1572864, 14155776, 56623104, 84934656, 905969664, 3623878656, 6442450944, 4294967296, 17179869184, 25769803776, 17179869184, 4294967296
Offset: 0

Author

Jeffrey Barnett, Jul 24 2007

Keywords

Crossrefs

Column k=4 of A221857. - Alois P. Heinz, Apr 17 2013

Programs

  • Maple
    a:= proc(n) option remember; local m, r; if n<2 then 1 else
          r:= iquo(n-1, 4, 'm'); binomial(4, m) *a(r+1)^m *a(r)^(4-m) fi
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
    a[n_] := a[n, 4];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(0) = a(1) = 1; a(4n+1+m) = (4 choose m) * a(n+1)^m * a(n)^(4-m), where n >= 0 and 0 <= m <= 4.

A131889 a(n) is the number of shapes of balanced trees with constant branching factor 3 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.

Original entry on oeis.org

1, 1, 3, 3, 1, 9, 27, 27, 81, 81, 27, 27, 9, 1, 27, 243, 729, 6561, 19683, 19683, 59049, 59049, 19683, 177147, 531441, 531441, 1594323, 1594323, 531441, 531441, 177147, 19683, 59049, 59049, 19683, 19683, 6561, 729, 243, 27, 1, 81, 2187, 19683, 531441, 4782969
Offset: 0

Author

Jeffrey Barnett, Jul 24 2007

Keywords

Comments

a(n) is always an integer power of 3.

Crossrefs

Column k=3 of A221857. - Alois P. Heinz, Apr 17 2013

Programs

  • Maple
    a:= proc(n) option remember; local m, r; if n<2 then 1 else
          r:= iquo(n-1, 3, 'm'); binomial(3, m) *a(r+1)^m *a(r)^(3-m) fi
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
    a[n_] := a[n, 3];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(0) = a(1) = 1; a(3n+1+m) = (3 choose m) * a(n+1)^m * a(n)^(3-m), where n >= 0 and 0 <= m <= 3.

A131891 a(n) is the number of shapes of balanced trees with constant branching factor 5 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.

Original entry on oeis.org

1, 1, 5, 10, 10, 5, 1, 25, 250, 1250, 3125, 3125, 31250, 125000, 250000, 250000, 100000, 500000, 1000000, 1000000, 500000, 100000, 250000, 250000, 125000, 31250, 3125, 3125, 1250, 250, 25, 1, 125, 6250, 156250, 1953125, 9765625, 488281250, 9765625000
Offset: 0

Author

Jeffrey Barnett, Jul 24 2007

Keywords

Crossrefs

Column k=5 of A221857. - Alois P. Heinz, Apr 17 2013

Programs

  • Maple
    a:= proc(n) option remember; local m, r; if n<2 then 1 else
          r:= iquo(n-1, 5, 'm'); binomial(5, m) *a(r+1)^m *a(r)^(5-m) fi
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
    a[n_] := a[n, 5];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(0) = a(1) = 1; a(5n+1+m) = (5 choose m) * a(n+1)^m * a(n)^(5-m), where n >= 0 and 0 <= m <= 5.

A131893 a(n) is the number of shapes of balanced trees with constant branching factor 7 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.

Original entry on oeis.org

1, 1, 7, 21, 35, 35, 21, 7, 1, 49, 1029, 12005, 84035, 352947, 823543, 823543, 17294403, 155649627, 778248135, 2334744405, 4202539929, 4202539929, 1801088541, 21012699645, 105063498225, 291843050625, 486405084375, 486405084375, 270225046875, 64339296875
Offset: 0

Author

Jeffrey Barnett, Jul 24 2007

Keywords

Crossrefs

Column k=7 of A221857. - Alois P. Heinz, Apr 17 2013

Programs

  • Maple
    a:= proc(n) option remember; local m, r; if n<2 then 1 else
          r:= iquo(n-1, 7, 'm'); binomial(7, m) *a(r+1)^m *a(r)^(7-m) fi
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
    a[n_] := a[n, 7];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(0) = a(1) = 1; a(7n+1+m) = (7 choose m) * a(n+1)^m * a(n)^(7-m), where n >= 0 and 0 <= m <= 7.

A131892 a(n) is the number of shapes of balanced trees with constant branching factor 6 and n nodes. The node is balanced if the size, measured in nodes, of each pair of its children differ by at most one node.

Original entry on oeis.org

1, 1, 6, 15, 20, 15, 6, 1, 36, 540, 4320, 19440, 46656, 46656, 699840, 4374000, 14580000, 27337500, 27337500, 11390625, 91125000, 303750000, 540000000, 540000000, 288000000, 64000000, 288000000, 540000000, 540000000, 303750000, 91125000, 11390625, 27337500
Offset: 0

Author

Jeffrey Barnett, Jul 24 2007

Keywords

Crossrefs

Column k=6 of A221857. - Alois P. Heinz, Apr 17 2013

Programs

  • Maple
    a:= proc(n) option remember; local m, r; if n<2 then 1 else
          r:= iquo(n-1, 6, 'm'); binomial(6, m) *a(r+1)^m *a(r)^(6-m) fi
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n - 1, k]; Binomial[k, m]*a[r + 1, k]^m*a[r, k]^(k - m)]]];
    a[n_] := a[n, 6];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jun 04 2018, after Alois P. Heinz *)

Formula

a(0) = a(1) = 1; a(6n+1+m) = (6 choose m) * a(n+1)^m * a(n)^(6-m), where n >= 0 and 0 <= m <= 6.

A110316 a(n) is the number of different shapes of balanced binary trees with n nodes. The tree is balanced if the total number of nodes in the left and right branch of every node differ by at most one.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 4, 1, 8, 16, 32, 16, 32, 16, 8, 1, 16, 64, 256, 256, 1024, 1024, 1024, 256, 1024, 1024, 1024, 256, 256, 64, 16, 1, 32, 256, 2048, 4096, 32768, 65536, 131072, 65536, 524288, 1048576, 2097152, 1048576, 2097152, 1048576, 524288, 65536, 524288
Offset: 0

Author

Jeffrey Barnett, Jun 23 2007

Keywords

Comments

The value of a(n) is always a power of 2.

References

  • Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585

Crossrefs

Column k=2 of A221857. - Alois P. Heinz, Apr 17 2013
Cf. A000225.

Programs

  • Maple
    a:= proc(n) option remember; local r; `if`(n<2, 1,
          `if`(irem(n, 2, 'r')=0, 2*a(r)*a(r-1), a(r)^2))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = If[EvenQ[n], 2 a[n/2] a[n/2-1], a[(n-1)/2 ]^2]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 31 2016 *)
  • Python
    def A110316(n): return 1<<(k:=n+1)-(sum(i.bit_count() for i in range(1,k))<<1)+k*(m:=k.bit_length())-(1<Chai Wah Wu, Mar 02 2023

Formula

a(0) = a(1) = 1; a(2*n) = 2*a(n)*a(n-1); a(2*n+1) = a(n)*a(n).
a(n) = 1 <=> n in { A000225 }. - Orson R. L. Peters, Mar 12 2024