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-10 of 17 results. Next

A091980 Recursive sequence; one more than maximum of products of pairs of previous terms with indices summing to current index.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 16, 26, 36, 56, 81, 131, 183, 287, 417, 677, 937, 1457, 2107, 3407, 4759, 7463, 10843, 17603, 24373, 37913, 54838, 88688, 123892, 194300, 282310, 458330, 634350, 986390, 1426440, 2306540, 3221844, 5052452, 7340712, 11917232, 16500522
Offset: 1

Views

Author

Keywords

Comments

The maximum is always obtained by taking i as the power of 2 nearest to n/2. - Anna de Mier, Mar 12 2012
a(n) is the number of (binary) max-heaps on n-1 elements from the set {0,1}. a(7) = 16: 000000, 100000, 101000, 101001, 110000, 110010, 110100, 110110, 111000, 111001, 111010, 111011, 111100, 111101, 111110, 111111. - Alois P. Heinz, Jul 09 2019

References

  • A. de Mier and M. Noy, On the maximum number of cycles in outerplanar and series-parallel graphs, Graphs Combin., 28 (2012), 265-275.

Crossrefs

Partial differences give A168542.
a(n) = A355108(n)+1.
Column k=0 of A370484 and of A372640.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f->
          1+b(f)*b(n-1-f))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    a:= n-> b(n-1):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jul 09 2019
  • Mathematica
    a[n_] := a[n] = 1 + Max[Table[a[i] a[n-i], {i, n-1}]]; a[1] = 1;
    Array[a, 50] (* Jean-François Alcover, Apr 30 2020 *)

Formula

a(n) = 1 + max_{i=1..n-1} a(i)*a(n-i) for n > 1, a(1) = 1.
From Alois P. Heinz, Jul 09 2019: (Start)
a(n) = Sum_{k=0..n-1} A309049(n-1,k).
a(2^(n-1)) = A003095(n). (End)

A114220 a(n) = Sum_{k=0..floor(n/2)} (k - (k-1)*0^(n-2*k)).

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 4, 6, 7, 10, 11, 15, 16, 21, 22, 28, 29, 36, 37, 45, 46, 55, 56, 66, 67, 78, 79, 91, 92, 105, 106, 120, 121, 136, 137, 153, 154, 171, 172, 190, 191, 210, 211, 231, 232, 253, 254, 276, 277, 300, 301, 325, 326, 351, 352, 378, 379, 406, 407, 435, 436
Offset: 0

Views

Author

Paul Barry, Nov 18 2005

Keywords

Comments

Diagonal sums of A114219.
It appears that the sequence terms from a(4) = 2 onwards are the exponents in the expansion of Sum_{n >= 0} q^(3*n-3) * Product_{k >= n} 1 - q^(2*k) = 1 - q^2 + q^3 - q^4 + q^6 - q^7 + q^10 - q^11 + - .... - Peter Bala, Jan 17 2025

Crossrefs

Column k=2 of A309049 (for n>0).

Programs

  • Magma
    [(2*n^2-2*n+7 + (9-2*n)*(-1)^n)/16: n in [0..80]]; // G. C. Greubel, Oct 21 2024
    
  • Mathematica
    CoefficientList[Series[(1-x-x^2+2x^3)/((1-x)(1-x^2)^2), {x,0,80}],x] (* Harvey P. Dale, Mar 24 2011 *)
  • SageMath
    def A114220(n): return (2*n^2-2*n+7 + (9-2*n)*(-1)^n)//16
    [A114220(n) for n in range(81)] # G. C. Greubel, Oct 21 2024

Formula

G.f.: (1-x-x^2+2x^3)/((1-x)*(1-x^2)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (2*n^2-2*n+7 + (9-2*n)*(-1)^n)/16.
a(n) = A055802(n+1), n > 1. - R. J. Mathar, Aug 11 2008
E.g.f.: (1/16)*((9 + 2*x)*exp(-x) + (7 + 2*x^2)*exp(x)). - G. C. Greubel, Oct 21 2024

A137560 Let f(z) = z^2 + c, then row k lists the expansion of the n-fold composition f(f(...f(0)...)) in rising powers of c.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 5, 6, 6, 4, 1, 0, 1, 1, 2, 5, 14, 26, 44, 69, 94, 114, 116, 94, 60, 28, 8, 1, 0, 1, 1, 2, 5, 14, 42, 100, 221, 470, 958, 1860, 3434, 6036, 10068, 15864, 23461, 32398, 41658, 49700, 54746, 55308, 50788, 41944, 30782, 19788
Offset: 0

Views

Author

Roger L. Bagula, Apr 25 2008

Keywords

Comments

The root of one of these polynomials gives Julia Douady's rabbit.
These polynomials are basic to the theory of "cycles" in complex dynamics.
These polynomials are also described in a comment by Donald D. Cross in the entry for the Catalan numbers, A000108.
Except for the first row, row sums are A003095 (a(n) = a(n-1)^2 + 1). - Gerald McGarvey, Sep 26 2008
The coefficients also enumerate the ways to divide a line segment into at most j pieces, with 0 <= j <= 2^n, in which every piece is a power of two in size (for example, 1/4 is allowed but 3/8 is not), no piece is less than 1/2^n of the whole, and every piece is aligned on a power of 2 boundary (so 1/4+1/2+1/4=1 is not allowed). See the everything2 web link (which treats the segment as a musical measure). - Robert Munafo, Oct 29 2009
Also the number of binary trees with exactly J leaf nodes and a height no greater than N. See the Munafo web page and note the connection to A003095. - Robert Munafo, Nov 03 2009
The sequence of polynomials is conjectured to tend to the Catalan numbers (A000108). - Jon Perry, Oct 31 2010
It can be shown that the initial n nonzero terms of row n are the first Catalan numbers. - Joerg Arndt, Jun 04 2016
From Jianing Song, Mar 23 2021: (Start)
Let P_0(z) = 0, P_{n+1}(z) = P_n(z)^2 + z for n >= 0. For n > 0, the n-th row gives the coefficients of P_n(z) (a polynomial with degree 2^(n-1) for n > 0) in rising powers of z. Note that the famous Mandelbrot set is Intersect_{n>=0} {z: |P_n(z)| <= 2}. In particular, the Mandelbrot set is compact since it is closed and bounded.
Let P(z) = (1 - sqrt(1-4*z))/2. For every 0 < r < 1/4, P_n(z) converges uniformly to P(z) on the disk {z: |z| <= r}, because |P_n(z) - P(z)| <= (1/2)*(1 - sqrt(1-4*r))^(n+1) for every |z| <= r. Note that P(z)/z is the generating function for Catalan numbers, which explains the comment from Joerg Arndt above. Is the convergence uniform on the disk {z: |z| <= 1/4}? (End)

Examples

			Triangle starts:
  {1},
  {0, 1},
  {0, 1, 1},
  {0, 1, 1, 2, 1},
  {0, 1, 1, 2, 5, 6, 6, 4, 1},
  {0, 1, 1, 2, 5, 14, 26, 44, 69, 94, 114, 116, 94, 60, 28, 8, 1},
  {0, 1, 1, 2, 5, 14, 42, 100, 221, 470, 958, 1860, 3434, 6036, 10068, 15864, 23461, 32398, 41658, 49700, 54746, 55308, 50788, 41944, 30782, 19788, 10948, 5096, 1932, 568, 120, 16, 1},
  ...
		

References

  • Lennart Carleson and Theodore W. Gamelin, Complex Dynamics, Springer, New York, 1993, pp 128-129

Crossrefs

A052154 gives the same array read by antidiagonals.
A137867 gives the related Misiurewicz polynomials. [From Robert Munafo, Dec 12 2009]
Cf. A202019 (reversed rows).
Cf. A309049.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f-> expand(
          x^n+b(f)*b(n-1-f)))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    T:= n-> `if`(n=0, 1, (m-> (p-> seq(coeff(p, x, m-i),
                      i=-1..m))(b(m)))(2^(n-1)-1)):
    seq(T(n), n=0..7);  # Alois P. Heinz, Jul 11 2019
  • Mathematica
    f[z_] = z^2 + x; g = Join[{1}, ExpandAll[NestList[f, x, 7]]]; a = Table[CoefficientList[g[[n]], x], {n, 1, Length[g]}]; Flatten[a] Table[Apply[Plus, CoefficientList[g[[n]], x]], {n, 1, Length[g]}];
  • PARI
    p = vector(6); p[1] = x; for(n=2,6, p[n] = p[n-1]^2 + x); print1("1"); for(n=1,6, for(m=0,poldegree(p[n]), print1(", ",polcoeff(p[n],m)))) \\ Gerald McGarvey, Sep 26 2008

Extensions

Edited by N. J. A. Sloane, Apr 26 2008
Offset set to 0 and new name from Joerg Arndt, Jun 04 2016

A168542 Number of trees that have a maximum 'n'.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 10, 10, 20, 25, 50, 52, 104, 130, 260, 260, 520, 650, 1300, 1352, 2704, 3380, 6760, 6770, 13540, 16925, 33850, 35204, 70408, 88010, 176020, 176020, 352040, 440050, 880100, 915304, 1830608, 2288260, 4576520, 4583290, 9166580, 11458225
Offset: 0

Views

Author

Endi Begeja (andy.bege(AT)libero.it), Nov 29 2009

Keywords

Comments

a(2^n) = Product_{k=1..n} A003095(k). - Michael Somos, Dec 20 2018

Crossrefs

Partial differences of A091980. - Alois P. Heinz, Jul 12 2019

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f->
          1+b(f)*b(n-1-f))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    a:= n-> b(n)-`if`(n=0, 0, b(n-1)):
    seq(a(n), n=0..45);  # Alois P. Heinz, Jul 12 2019
  • Mathematica
    a[ n_] := If[ n < 3, Boole[n > 0], With[{m = BitLength[Quotient[n, 3]] - 1}, Nest[#^2 + 1 &, 2, m] a[n - 2 2^m]]]; (* Michael Somos, Dec 20 2018 *)
  • PARI
    {a(n) = if( n<3, n>0, my(m = #binary(n\3)-1, t = 2); for(i=1, m, t = t^2+1); t*a(n - 2*2^m))}; /* Michael Somos, Dec 20 2018 */

Formula

a(1) = a(2) = 1, a(3*2^m + k) = A003095(m+2) * a(n - 2*2^m) where 0 <= k < 3*2^m. - Michael Somos, Dec 20 2018
a(n) = Sum_{k=0..n} (A309049(n,k)-A309049(n-1,k)) for n > 0, a(0) = 1. - Alois P. Heinz, Jul 12 2019

Extensions

a(0)=1 prepended by Alois P. Heinz, Jul 12 2019

A309052 Total number of 1's in all (binary) max-heaps on n elements from the set {0,1}.

Original entry on oeis.org

0, 1, 3, 8, 15, 31, 54, 105, 166, 298, 478, 863, 1307, 2247, 3500, 6136, 9032, 15084, 23039, 39599, 57955, 96019, 145627, 248223, 357650, 583274, 875459, 1476754, 2131618, 3476550, 5210521, 8766473, 12498445, 20138409, 29952394, 50020414, 71658602, 115850282
Offset: 0

Views

Author

Alois P. Heinz, Jul 09 2019

Keywords

Comments

Also the total number of 0's in all (binary) min-heaps on n elements from the set {0,1}.

Examples

			a(4) = 15 = 0+1+2+2+3+3+4, the total number of 1's in 0000, 1000, 1010, 1100, 1101, 1110, 1111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f-> expand(
          1+x*b(f)*b(n-1-f)))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    a:= n-> subs(x=1, diff(b(n), x)):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_][x_] := b[n][x] = If[n == 0, 1, Function[g, Function[f, Expand[1 + x b[f][x] b[n - 1 - f][x]]][Min[g - 1, n - g/2]]][2^(Length[IntegerDigits[ n, 2]] - 1)]];
    a[n_] := b[n]'[1];
    a /@ Range[0, 40] (* Jean-François Alcover, Apr 22 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n} (n-k) * A309049(n,k).
a(n) = n * A091980(n+1) - A309051(n).
a(2^n-1) = A024358(n).

A024358 Sum of the sizes of binary subtrees of the perfect binary tree of height n.

Original entry on oeis.org

0, 1, 8, 105, 6136, 8766473, 8245941529080, 3508518207951157937469961, 311594265746788494170062926869662848646207622648, 1217308491239906829392988008143949647398943617188660186130545502913055217344025410733271773705
Offset: 0

Views

Author

Cyril Banderier, Jun 09 2000

Keywords

Comments

Size of binary tree = number of internal nodes.

Crossrefs

Programs

  • Maple
    B:= proc(n) B(n):= `if`(n<0, 0, expand(1+x*B(n-1)^2)) end:
    a:= n-> subs(x=1, diff(B(n), x)):
    seq(a(n), n=0..9);  # Alois P. Heinz, Jul 12 2019
  • Mathematica
    B[n_] := If[n<0, 0, Expand[1+x*B[n-1]^2]];
    a[n_] := D[B[n], x] /. x -> 1;
    Table[a[n], {n, 0, 9}] (* Jean-François Alcover, Oct 13 2022, after Alois P. Heinz *)

Formula

a(n) = B'n(1) where B{n+1}(x) = 1 + x*B_n(x)^2.
From Alois P. Heinz, Jul 12 2019: (Start)
a(n) = Sum_{k=0..2^n-1} (2^n-1-k) * A309049(2^n-1,k).
a(n) = A309052(2^n-1). (End)

Extensions

a(0) changed to 0 by Alois P. Heinz, Jul 12 2019

A202019 Triangle by rows, related to the numbers of binary trees of height less than n, derived from the Mandelbrot set.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 4, 6, 6, 5, 2, 1, 1, 1, 8, 28, 60, 94, 116, 114, 94, 69, 44, 26, 14, 5, 2, 1, 1, 1, 16, 120, 568, 1932, 5096, 10948, 19788, 30782, 41944, 50788, 55308, 54746, 49700, 41658, 32398, 23461, 15864, 10068, 6036, 3434, 1860, 958, 470, 221, 100, 42, 14, 5, 2, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Dec 08 2011

Keywords

Comments

As shown on p. 74 [Diaconis & Graham], n-th row polynomials are cyclic with period n, given real roots, if the polynomials are divided through by n. For example, taking x^3 + 2x^2 + x + 1 = 0, the real root = -1.75487766... = c. Then using x^2 + c, we obtain the period three trajectory: -1.75487... -> 1.32471...-> 0.
The shuffling connection [p.75], resulting in a permutation that is the Gilbreath shuffle: "To make the connection with shuffling cards, write down a periodic sequence starting at zero. Write a one above the smallest point, a two above the next smallest point and so on. For example, if c = -1.75486...(a period three point), we have:
2.............1.............3......
0........-1.75487........1.32471... For a fixed value of c, the numbers written on top code up a permutation that is a Gilbreath shuffle".
Row sums = A003095: (1, 2, 5, 26, 677,...) relating to the number of binary trees of height less than n.
Let f(z) = z^2 + c, then row k lists the expansion of the n-fold composition f(f(...f(0)...)) in falling powers of c (with the coefficients for c^0 omitted). The n initial terms of the reversed n-th row are the Catalan numbers (cf. A137560). - Joerg Arndt, Jun 04 2016

Examples

			Row 4 = (1, 4, 6, 6, 5, 2, 1, 1) since (x^4 + 2x^3 + x^2 + x)^2 + x = x^8 + 4x^7 + 6x^6 + 6x^5 + 5x^4 + 2x^3 + x^2 + x.
Triangle begins:
  1;
  1, 1;
  1, 2,  1,  1;
  1, 4,  6,  6,  5,   2,   1,  1;
  1, 8, 28, 60, 94, 116, 114, 94, 69, 44, 26, 14, 5, 2, 1, 1;
  ...
		

References

  • Persi Diaconis & R. L. Graham, "Magical Mathematics: The Mathematical Ideas That Animate Great Magic Tricks", Princeton University Press, 2012; pp. 73-83.

Crossrefs

Row sums are A003095.
Cf. A137560 (reversed rows).
Cf. A309049.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f-> expand(
          x^n+b(f)*b(n-1-f)))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(2^(n-1)-1)):
    seq(T(n), n=1..7);  # Alois P. Heinz, Jul 11 2019
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Function[g, Function[f, Expand[x^n + b[f]*
         b[n-1-f]]][Min[g-1, n-g/2]]][2^(Length[IntegerDigits[n, 2]]-1)]];
    T[n_] := CoefficientList[b[2^(n-1)-1], x];
    Array[T, 7] // Flatten (* Jean-François Alcover, Feb 19 2021, after Alois P. Heinz *)

Formula

Coefficients of x by rows such that given n-th row p(x), the next row is (p(x))^2 + x; starting x -> (x^2 + x) -> (x^4 + 2*x^3 + x^2 + x)...
T(n,k) = A309049(2^(n-1)-1,k-1). - Alois P. Heinz, Jul 11 2019

A309051 Total number of 0's in all (binary) max-heaps on n elements from the set {0,1}.

Original entry on oeis.org

0, 1, 3, 7, 13, 24, 42, 77, 122, 206, 332, 578, 889, 1484, 2338, 4019, 5960, 9685, 14887, 25134, 37225, 60704, 92919, 156646, 227302, 364551, 550329, 917822, 1337358, 2158150, 3258779, 5441757, 7800755, 12412461, 18546566, 30708486, 44327782, 71090442
Offset: 0

Views

Author

Alois P. Heinz, Jul 09 2019

Keywords

Comments

Also the total number of 1's in all (binary) min-heaps on n elements from the set {0,1}.

Examples

			a(4) = 13 = 4+3+2+2+1+1+0, the total number of 0's in 0000, 1000, 1010, 1100, 1101, 1110, 1111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f-> expand(
          x^n+b(f)*b(n-1-f)))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    a:= n-> subs(x=1, diff(b(n), x)):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_][x_] := b[n][x] = If[n == 0, 1, Function[g, Function[f, Expand[x^n + b[f][x] b[n - 1 - f][x]]][Min[g - 1, n - g/2]]][2^(Length[IntegerDigits[ n, 2]] - 1)]];
    a[n_] := b[n]'[1];
    a /@ Range[0, 40] (* Jean-François Alcover, Apr 22 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n} k * A309049(n,k).
a(n) = n * A091980(n+1) - A309052(n).

A309050 Number of (binary) max-heaps on 2n elements from the set {0,1} containing n 0's and n 1's.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 27, 54, 109, 219, 460, 962, 1986, 4044, 8516, 18058, 37801, 77701, 164300, 350336, 738945, 1530521, 3250659, 6962248, 14735660, 30625898, 65206770, 140040538, 297712980, 622136512, 1328716192, 2861101350, 6086238317, 12716525621, 27172910036
Offset: 0

Views

Author

Alois P. Heinz, Jul 09 2019

Keywords

Comments

Also the number of (binary) min-heaps on 2n elements from the set {0,1} containing n 0's and n 1's.

Examples

			a(0) = 1: ().
a(1) = 1: 10.
a(2) = 2: 1010, 1100.
a(3) = 4: 101001, 110010, 110100, 111000.
a(4) = 7: 10100110, 11010001, 11011000, 11100010, 11100100, 11101000, 11110000.
a(5) = 13: 1101000110, 1101100001, 1101100010, 1101100100, 1110011000, 1110100001, 1110101000, 1110110000, 1111000010, 1111000100, 1111001000, 1111010000, 1111100000.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (g-> (f-> expand(
          x^n+b(f)*b(n-1-f)))(min(g-1, n-g/2)))(2^ilog2(n)))
        end:
    a:= n-> coeff(b(2*n), x, n):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Function[g, Function[f, Expand[x^n + b[f]*b[n - 1 - f]]][Min[g - 1, n - g/2]]][2^(Length@IntegerDigits[n, 2] - 1)]];
    a[n_] := Coefficient[b[2n], x, n];
    a /@ Range[0, 40] (* Jean-François Alcover, Apr 19 2021, after Alois P. Heinz *)

Formula

a(n) = A309049(2n,n).

A326504 Number of (binary) max-heaps on n elements from the set {0,1} containing exactly three 0's.

Original entry on oeis.org

1, 1, 2, 4, 6, 8, 12, 16, 23, 27, 38, 44, 60, 66, 88, 96, 125, 133, 170, 180, 226, 236, 292, 304, 371, 383, 462, 476, 568, 582, 688, 704, 825, 841, 978, 996, 1150, 1168, 1340, 1360, 1551, 1571, 1782, 1804, 2036, 2058, 2312, 2336, 2613, 2637, 2938, 2964, 3290
Offset: 3

Views

Author

Alois P. Heinz, Jul 09 2019

Keywords

Crossrefs

Column k=3 of A309049.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-2,0,0,-2,2,1,-1},{1,1,2,4,6,8,12,16,23},60] (* Harvey P. Dale, Mar 11 2023 *)

Formula

G.f.: x^3*(2*x^6-2*x^5+2*x^3-x^2+1)/((x^2+1)*(x+1)^3*(x-1)^4).
Showing 1-10 of 17 results. Next