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: Herbert Eberle

Herbert Eberle's wiki page.

Herbert Eberle has authored 6 sequences.

A351912 Period of binary representation of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 2, 0, 4, 2, 3, 0, 6, 4, 10, 2, 12, 3, 4, 0, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 0, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, 23, 2, 21, 20, 8, 12, 52, 18, 20, 3, 18, 28, 58, 4, 60, 5, 6, 0, 12, 10, 66, 8, 22, 12, 35, 6, 9, 36, 20, 18, 30, 12, 39, 4, 54, 20, 82, 6
Offset: 1

Author

Herbert Eberle, Mar 15 2022

Keywords

Comments

The difference from A007733 is that if n is a power of 2 this sequence has 0, whereas A007733(2^n) = 1.

Crossrefs

Cf. A007733, which is the main entry for this problem.
Cf. A242595.
Cf. A249772 (base 6), A051626 (decimal), A246004 (base 12).

A306557 Numerator coefficients of the bivariate Maclaurin series ("inverse Kepler equation") developed as Lagrange inversion E=KeplerInv(e,M) of Kepler's equation M = Kepler(e,E) = E - e*sin(E).

Original entry on oeis.org

1, 1, 9, 1, 54, 225, 1, 243, 4131, 11025, 1, 1008, 50166, 457200, 893025, 1, 4077, 520218, 11708154, 70301925, 108056025, 1, 16362, 5020623, 243313164, 3274844175, 14427513450, 18261468225, 1, 65511, 46789461, 4535570691, 119537963811, 1107456067125, 3821273720775, 4108830350625
Offset: 0

Author

Herbert Eberle, Feb 23 2019

Keywords

Comments

Coefficients of the numerator polynomials of the bivariate Maclaurin series ("inverse Kepler equation") developed as Lagrange inversion E = KeplerInv(e,M) of Kepler's equation M = Kepler(e,E) = E - e*sin(E), where e=numeric eccentricity, M=mean anomaly, E=eccentric anomaly. The series is KeplerInv(e,M) = M/(1-e) + Sum_{n>=1} (-1)^n*(Sum_{j=1..n} a(n,j)*e^j)/(1-e)^(3n+1)*M^(2n+1)/(2n+1)! = M/(1-e) - (e/(1-e)^4)*M^3/3! + ((e+9*e^2)/(1-e)^7)*M^5/5! - + ... .
The element a(n,n) with highest index in each row (the diagonal element) has the form Product_{j=1..n} (2*j+1)^2.
The derivative dKepler/dE = 1 - e*cos(E) goes to zero at E = i*arccosh(1/e) in the complex plane. Thus dKeplerInv/dM goes to infinity at M = i*(arccosh(1/e) - sqrt(1-e^2)), so that the radius of convergence of KeplerInv(e,M) is arccosh(1/e) - sqrt(1-e^2). KeplerInv(e,M) converges linearly within the circle of convergence |M| < arccosh(1/e) - sqrt(1-e^2).

Examples

			Matrix (regular triangle) lexicographically ascending in the rows:
  1;
  1,     9;
  1,    54,     225;
  1,   243,    4131,     11025;
  1,  1008,   50166,    457200,     893025;
  1,  4077,  520218,  11708154,   70301925,   108056025;
  1, 16362, 5020623, 243313164, 3274844175, 14427513450, 18261468225;
  ...
		

Crossrefs

Generated by A111785 or A304462, diagonal elements are in A001818.

Formula

While M = E - e*sin(E) = E*(1-e) - e*Sum_{n>=1} (-1)^n*E^(2n+1)/(2n+1)! the formal power series of the compositional inverse KeplerInv(e,M) is as above according to A111785 and A304462.

A304462 Coefficients of the compositionally inverted power series g:=f^{-1} of a formal power series f with the starting coefficients f_0=0 and f_1=1 expressed as polynomials in the coefficients f_2, f_3, ... of the given power series f(X) = X + f_2*X^2 + f_3*X^3 + ...

Original entry on oeis.org

1, -1, -1, 2, -1, 5, -5, -1, 6, 3, -21, 14, -1, 7, 7, -28, -28, 84, -42, -1, 8, 8, -36, 4, -72, 120, -12, 180, -330, 132, -1, 9, 9, -45, 9, -90, 165, -45, -45, 495, -495, 165, -990, 1287, -429
Offset: 0

Author

Herbert Eberle, May 13 2018

Keywords

Comments

If g is taken as g(X) = X + g_2*X^2 + g_3*X^3 + ... then the compositions are (g circle f)(X) = g(f(X)) = X and (f circle g)(X) = f(g(X)) = X.
Lexicographically descending in the rows, i.e., f(5) f(2)^2 f(1)^3 (-36) > f(4)^2 f(1)^4 (+4).
This is another version of A111785, where each row is sorted lexicographically ascending, i.e., f(1)^4 f(4)^2 (+4) < f(1)^3 f(2)^2 f(5) (-36).

Examples

			Matrix lexicographically descending in the rows:
for instance f(5) f(2)^2 f(1)^3 (-36) > f(4)^2 f(1)^4 (+4)
1;
-1;
-1,2;
-1,5,-5;
-1,6,3,-21,14;
-1,7,7,-28,-28,84,-42;
-1,8,8,-36,4,-72,120,-12,180,-330,132;
-1,9,9,-45,9,-90,165,-45,-45,495,-495,165,-990,1287,-429;
-1,10,10,-55,10,-110,220,5,-110,-55,660,-715,-55,330,660,-2860,2002,55,-1430,5005,-5005,1430;
		

References

  • Morse, P. M. and Feshbach, H., Methods of Theoretical Physics, Part I. New York: McGraw-Hill, 1953.

Crossrefs

Cf. A111785.

Programs

  • MuPAD
    alfa:=["a","b","c","d","e","f","g","h","i","j","k"]:
    byRow := proc(od, // original weighted degree
    wd, // remaining weighted degree
    il, // index of last indeterminate
    jl, // exponent of last indeterminate
    ni, // remaining number of indeterminates
    lx) // lexicographic string
    local j;
    begin
      if wd > 1 then
        for j from min(wd,il) downto 2 do:
          if j >= il then
            j:=il: // stay at the latest indeterminate
            byRow(od,wd-j+1,j,jl+1,ni-1,lx.alfa[j]):
          else // advance to next indeterminate
            byRow(od,wd-j+1,j,1   ,ni-1,lx.alfa[j]):
          end_if:
        end_for:
      else // output the monomial
        dd:=1: d0:="+": dc:=1:
        for j from length(lx)-1 downto 0 do:
          d1:=substring(lx,j):
          if d1 <> d0 then
            d0:=d1: dc:=1: dd:=-dd:
          else // the indeterminate changes
            dc:=dc+1: dd:=-dd*dc:
          end_if:
        end_for:
        nn:=fact(2*od-ni-2)/fact(od): // rising factorial
    // One row of A304462: coefficients of the lexicographically descending monomials:
        print(nn/dd):
    // One row of A304462: coefficients of the lexicographically descending monomials
    // plus some representation of the monomials themselves:
    //    for j from 1 to ni do:
    //      lx:=lx."a":
    //    end_for:
    //    print(nn/dd,lx): // monomial lx
      end_if:
    end_proc:
    // Output the 8th row:
    n:=8:
    byRow(n,n,n,0,n-1,"")

Formula

g(n) := f(1)^(-n) Sum_{j(2), j(3), ...} (-1)^{j(2) + j(3) + ...} ((n-1 + j(2) + j(3) + ...)!)/(n! j(2)! j(3)! ...) ((f(2))/(f(1))^j(2) ((f(3))/(f(1)))^j(3) ...
The sum is to be taken over all combinations of the exponents {j(2), j(3), j(4), ...} with j(2) + 2j(3) + 3j(4) + ... = n-1. See Morse, P. M. and Feshbach, H. pp. 411-413.

A228153 Triangle read by columns: T(n,k) = maximal external path length of AVL trees of height n with k (leaf-) nodes, k>=1, A029837(k)<=n<A072649(k).

Original entry on oeis.org

0, 2, 5, 8, 12, 16, 20, 24, 25, 30, 35, 40, 44, 49, 50, 54, 56, 59, 62, 64, 68, 73, 79, 85, 91, 97, 96, 102, 103, 107, 110, 113, 117, 119, 123, 125, 130, 131, 137, 136, 144, 142, 151, 148, 157, 154, 163, 160, 170, 177, 184, 180, 191, 188, 197, 196, 204, 204
Offset: 1

Author

Herbert Eberle, Aug 13 2013

Keywords

Comments

The external path length of a tree is the sum of the levels of its external nodes (i.e. leaves).

Examples

			In the (two) AVL trees of height 2 the 3 external nodes (leaves) have once depth 1 and twice depth 2:
       o       o
      / \     / \
     o   1   1   o
    / \         / \
   2   2       2   2
so that the sum of depths is 5 for both trees.
Triangle begins:
  0
  . 2
  . . 5 8
  . . . . 12 16 20 24
  . . . .  .  .  . 25 30 35 40 44 49 54 59 64
  . . . .  .  .  .  .  .  .  .  . 50 56 62 68 73 79 85 91 97 102 ...
  . . . .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 96 103 ...
		

References

  • D. E. Knuth, Art of Computer Programming, Vol. 3, Sect. 6.2.3 (7) and (8).

Crossrefs

Triangle read by rows gives: A228152.
Row maxima give: n*2^n = A036289(n).
Row minima give: A067331(n-1) for n>0 or A166106(n+2).
Row lengths give: 1+A008466(n).
Number of AVL trees read by rows gives: A143897.
The infimum of all external path lengths of binary trees with k (leaf-) nodes is: A003314(k) for k>0.
Column maxima give: A228155(k).
Column heights give: A217710(k).
Number of AVL trees read by columns gives: A217298.

Programs

  • Mathematica
    maxNods = 100; Clear[T, A029837, A072649, A036289, A228155]; T[0, 1] = 0; A029837[1] = 0; A072649[1] = 1; A228155[1] = 0; For[k = 2, k <= maxNods, k++, A029837[k] = maxNods; A072649[k] = 0; A228155u = 0; For[kL = 1, kL <= Floor[k/2], kL++, For[hL = A029837[kL], hL <= A072649[kL] - 1, hL++, For[hR = Max[hL - 1, A029837[k - kL]], hR <= Min[hL + 1, A072649[k - kL] - 1], hR++, maxDepthSum = k + T[hL, kL] + T[hR, k - kL]; A228155u = Max[maxDepthSum, A228155u]; h = Max[hL, hR] + 1; If[ !IntegerQ[T[h, k]], T[h, k] = maxDepthSum, T[h, k] = Max[maxDepthSum, T[h, k]]]; A029837[k] = Min[h, A029837[k]]; If[ !IntegerQ[A036289[h]], A036289[h] = maxDepthSum, A036289[h] = Max[maxDepthSum, A036289[h]]]; A072649[k] = Max[h + 1, A072649[k]]; ]]]; A228155[k] = A228155u]; k =.; Table[ Select[ Table[T[n, k], {n, A029837[k], A072649[k] - 1}], IntegerQ], {k, 1, maxNods}] // Flatten (* Jean-François Alcover, Aug 19 2013, translated and adapted from Herbert Eberle's MuPAD program *)
  • MuPAD
    maxNods:=100: // max number of leaves (= external nodes)
    // Triangle T for all AVL trees with <= maxNods leaves:
    delete T:
    // table T indexed [h, k] (h=height, k=number of leaves):
    T[0, 1]:=0:
    // A029837 indexed [k], min height of tree with k leaves:
    A029837:=array(1..maxNods): A029837[1]:=0:
    // A072649 indexed [k], 1+max height of AVL tree with k leaves:
    A072649:=array(1..maxNods): A072649[1]:=1:
    // A036289 indexed [h], max depthsum of all height h AVL trees:
    A036289:=array(1..maxNods):
    // A228155 indexed [k], max depthsum of all AVL trees with k leaves:
    A228155:=array(1..maxNods): A228155[1]:=0:
    for k from 2 to maxNods do:
      A029837[k]:=maxNods: // try infinity for the min height
      A072649[k]:=0:
      A228155u:=0:
      // Put together 2 AVL trees:
      for kL from 1 to floor(k/2) do:
        // kL leaves in the left tree
        for hL from A029837[kL] to A072649[kL]-1 do:
          for hR from max(hL-1, A029837[k-kL])
                   to min(hL+1, A072649[k-kL]-1) do:
            // k-kL leaves in the right subtree
            maxDepthSum:=T[hL, kL]+T[hR, k-kL]+k:
            A228155u:=max(maxDepthSum, A228155u):
            h:=max(hL, hR)+1:
            if type(T[h, k]) <> DOM_INT then // T[h, k] uninit
              T[h, k]:=maxDepthSum:
            else
              T[h, k]:=max(maxDepthSum, T[h, k]):
            end_if:
            A029837[k]:=min(h, A029837[k]):
            if type(A036289[h]) <> DOM_INT then
              A036289[h]:=maxDepthSum:
            else
              A036289[h]:=max(maxDepthSum, A036289[h]):
            end_if:
            A072649[k]:=max(h+1, A072649[k]):
          end_for: // hR
        end_for: // hL
      end_for: // kL
      A228155[k]:=A228155u:
    end_for: // k

A228152 Triangle read by rows: T(n,k) = maximal external path length of AVL trees of height n with k (leaf-) nodes, n>=0, fibonacci(n+2)<=k<=2^n.

Original entry on oeis.org

0, 2, 5, 8, 12, 16, 20, 24, 25, 30, 35, 40, 44, 49, 54, 59, 64, 50, 56, 62, 68, 73, 79, 85, 91, 97, 102, 107, 113, 119, 125, 131, 136, 142, 148, 154, 160, 96, 103, 110, 117, 123, 130, 137, 144, 151, 157, 163, 170, 177, 184, 191, 197, 204, 211, 218, 225, 231
Offset: 0

Author

Herbert Eberle, Aug 13 2013

Keywords

Comments

The external path length of a tree is the sum of the levels of its external nodes (i.e. leaves).

Examples

			T(2,3) = 5 because in the (two) AVL trees of height 2 with 3 (leaf-) nodes one has depth 1 and two have depth 2:
       o       o
      / \     / \
     o   1   1   o
    / \         / \
   2   2       2   2
so that the sum of depths is 5 for both trees.
Triangle begins:
  0
  . 2
  . . 5 8
  . . . . 12 16 20 24
  . . . .  .  .  . 25 30 35 40 44 49 54 59 64
  . . . .  .  .  .  .  .  .  .  . 50 56 62 68 73 79 85 91 97 102 ...
  . . . .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 96 103 ...
		

References

  • D. E. Knuth, Art of Computer Programming, Vol. 3, Sect. 6.2.3 (7) and (8).

Crossrefs

Row maxima give: n*2^n = A036289(n).
Row minima give: A067331(n-1) for n>0 or A166106(n+2).
Row lengths give: 1+A008466(n).
Number of AVL trees read by rows gives: A143897.
Triangle read by columns gives: A228153.
The infimum of all external path lengths of binary trees with k (leaf-) nodes is: A003314(k) for k>0.
Column maxima give: A228155(k).
Column heights give: A217710(k).
Number of AVL trees read by columns gives: A217298.

Programs

  • Maple
    with(combinat): F:=fibonacci:
    T:= proc(n, k) option remember; `if`(n<1, 0, max(seq([k+T(n-1,t)+
          T(n-1,k-t), k+T(n-1,t) +T(n-2,k-t)][], t=F(n+1)..k-1)))
        end:
    seq(seq(T(n, k), k=F(n+2)..2^n), n=0..7);  # Alois P. Heinz, Aug 14 2013
  • Mathematica
    maxNods = 100; Clear[T, A029837, A072649, A036289, A228155]; T[0, 1] = 0; A029837[1] = 0; A072649[1] = 1; A228155[1] = 0; For[k = 2, k <= maxNods, k++, A029837[k] = maxNods; A072649[k] = 0; A228155u = 0; For[kL = 1, kL <= Floor[k/2], kL++, For[hL = A029837[kL], hL <= A072649[kL] - 1, hL++, For[hR = Max[hL - 1, A029837[k - kL]], hR <= Min[hL + 1, A072649[k - kL] - 1], hR++, maxDepthSum = k + T[hL, kL] + T[hR, k - kL]; A228155u = Max[maxDepthSum, A228155u]; h = Max[hL, hR] + 1; If[ !IntegerQ[T[h, k]], T[h, k] = maxDepthSum, T[h, k] = Max[maxDepthSum, T[h, k]]]; A029837[k] = Min[h, A029837[k]]; If[ !IntegerQ[A036289[h]], A036289[h] = maxDepthSum, A036289[h] = Max[maxDepthSum, A036289[h]]]; A072649[k] = Max[h + 1, A072649[k]]; ]]]; A228155[k] = A228155u]; k =.; Table[T[n, k], {n, 0, maxNods}, {k, 1, maxNods}] // Flatten // Select[#, IntegerQ]& (* Jean-François Alcover, Aug 14 2013, translated and adapted from Herbert Eberle's MuPAD program *)
  • MuPAD
    maxNods:=100: // max number of leaves (= external nodes)
    // Triangle T for all AVL trees with <= maxNods leaves:
    delete T:
    // table T indexed [h, k] (h=height, k=number of leaves):
    T[0, 1]:=0:
    // A029837 indexed [k], min height of tree with k leaves:
    A029837:=array(1..maxNods): A029837[1]:=0:
    // A072649 indexed [k], 1+max height of AVL tree with k leaves:
    A072649:=array(1..maxNods): A072649[1]:=1:
    // A036289 indexed [h], max depthsum of all height h AVL trees:
    A036289:=array(1..maxNods):
    // A228155 indexed [k], max depthsum of all AVL trees with k leaves:
    A228155:=array(1..maxNods): A228155[1]:=0:
    for k from 2 to maxNods do:
      A029837[k]:=maxNods: // try infinity for the min height
      A072649[k]:=0:
      A228155u:=0:
      // Put together 2 AVL trees:
      for kL from 1 to floor(k/2) do:
        // kL leaves in the left tree
        for hL from A029837[kL] to A072649[kL]-1 do:
          for hR from max(hL-1, A029837[k-kL])
                   to min(hL+1, A072649[k-kL]-1) do:
            // k-kL leaves in the right subtree
            maxDepthSum:=T[hL, kL]+T[hR, k-kL]+k:
            A228155u:=max(maxDepthSum, A228155u):
            h:=max(hL, hR)+1:
            if type(T[h, k]) <> DOM_INT then // T[h, k] uninit
              T[h, k]:=maxDepthSum:
            else
              T[h, k]:=max(maxDepthSum, T[h, k]):
            end_if:
            A029837[k]:=min(h, A029837[k]):
            if type(A036289[h]) <> DOM_INT then
              A036289[h]:=maxDepthSum:
            else
              A036289[h]:=max(maxDepthSum, A036289[h]):
            end_if:
            A072649[k]:=max(h+1, A072649[k]):
          end_for: // hR
        end_for: // hL
      end_for: // kL
      A228155[k]:=A228155u:
    end_for: // k

A228155 Maximal external path length of AVL trees with n (leaf-) nodes.

Original entry on oeis.org

0, 2, 5, 8, 12, 16, 20, 25, 30, 35, 40, 44, 50, 56, 62, 68, 73, 79, 85, 91, 97, 103, 110, 117, 123, 130, 137, 144, 151, 157, 163, 170, 177, 184, 191, 197, 204, 211, 219, 227, 235, 243, 250, 257, 265, 273, 281, 289, 296, 304, 312, 320, 328, 335, 342, 349, 356
Offset: 1

Author

Herbert Eberle, Aug 14 2013

Keywords

Comments

The external path length of a tree is the sum of the levels of its external nodes (i.e. leaves).

Examples

			The (two) AVL trees with 3 (leaf-) nodes have one with depth 1 and two with depth 2:
       o       o
      / \     / \
     o   1   1   o
    / \         / \
   2   2       2   2
so a(3) = 5.
		

References

  • D. E. Knuth, Art of Computer Programming, Vol. 3, Sect. 6.2.3 (7) and (8).

Crossrefs

Column maxima of triangles A228152, A228153.
Row maxima give: n*2^n = A036289(n).
Row minima give: A067331(n-1) for n>0 or A166106(n+2).
Row lengths give: 1+A008466(n).
Column heights give: A217710(k).
Number of AVL trees read by rows gives: A143897.
The infimum of all external path lengths of all binary trees with k (leaf-) nodes is: A003314(k) for k>0.
Number of AVL trees read by columns gives: A217298.

Programs

  • Mathematica
    maxNods = 100; Clear[T, A029837, A072649, A036289, A228155]; T[0, 1] = 0; A029837[1] = 0; A072649[1] = 1; A228155[1] = 0; For[k = 2, k <= maxNods, k++, A029837[k] = maxNods; A072649[k] = 0; A228155u = 0; For[kL = 1, kL <= Floor[k/2], kL++, For[hL = A029837[kL], hL <= A072649[kL] - 1, hL++, For[hR = Max[hL - 1, A029837[k - kL]], hR <= Min[hL + 1, A072649[k - kL] - 1], hR++, maxDepthSum = k + T[hL, kL] + T[hR, k - kL]; A228155u = Max[maxDepthSum, A228155u]; h = Max[hL, hR] + 1; If[ !IntegerQ[T[h, k]], T[h, k] = maxDepthSum, T[h, k] = Max[maxDepthSum, T[h, k]]]; A029837[k] = Min[h, A029837[k]]; If[ !IntegerQ[A036289[h]], A036289[h] = maxDepthSum, A036289[h] = Max[maxDepthSum, A036289[h]]]; A072649[k] = Max[h + 1, A072649[k]]; ]]]; A228155[k] = A228155u]; k =.; Table[A228155[k], {k, 1, maxNods}] (* Jean-François Alcover, Aug 19 2013, translated and adapted from Herbert Eberle's MuPAD program *)
  • MuPAD
    maxNods:=100: // max number of leaves (= external nodes)
    // Triangle T for all AVL trees with <= maxNods leaves:
    delete T:
    // table T indexed [h, k] (h=height, k=number of leaves):
    T[0, 1]:=0:
    // A029837 indexed [k], min height of tree with k leaves:
    A029837:=array(1..maxNods): A029837[1]:=0:
    // A072649 indexed [k], 1+max height of AVL tree with k leaves:
    A072649:=array(1..maxNods): A072649[1]:=1:
    // A036289 indexed [h], max depthsum of all height h AVL trees:
    A036289:=array(1..maxNods):
    // A228155 indexed [k], max depthsum of all AVL trees with k leaves:
    A228155:=array(1..maxNods): A228155[1]:=0:
    for k from 2 to maxNods do:
      A029837[k]:=maxNods: // try infinity for the min height
      A072649[k]:=0:
      A228155u:=0:
      // Put together 2 AVL trees:
      for kL from 1 to floor(k/2) do:
        // kL leaves in the left tree
        for hL from A029837[kL] to A072649[kL]-1 do:
          for hR from max(hL-1, A029837[k-kL])
                   to min(hL+1, A072649[k-kL]-1) do:
            // k-kL leaves in the right subtree
            maxDepthSum:=T[hL, kL]+T[hR, k-kL]+k:
            A228155u:=max(maxDepthSum, A228155u):
            h:=max(hL, hR)+1:
            if type(T[h, k]) <> DOM_INT then // T[h, k] uninit
              T[h, k]:=maxDepthSum:
            else
              T[h, k]:=max(maxDepthSum, T[h, k]):
            end_if:
            A029837[k]:=min(h, A029837[k]):
            if type(A036289[h]) <> DOM_INT then
              A036289[h]:=maxDepthSum:
            else
              A036289[h]:=max(maxDepthSum, A036289[h]):
            end_if:
            A072649[k]:=max(h+1, A072649[k]):
          end_for: // hR
        end_for: // hL
      end_for: // kL
      A228155[k]:=A228155u:
    end_for: // k