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-3 of 3 results.

A273902 Number of odd-length columns in all bargraphs having semiperimeter n (n>=2).

Original entry on oeis.org

1, 2, 6, 20, 64, 204, 656, 2120, 6873, 22350, 72881, 238232, 780384, 2561164, 8419766, 27721784, 91397927, 301710074, 997087170, 3298556716, 10922576840, 36199599880, 120068987717, 398547827336, 1323821438203, 4400043488826, 14633372199291
Offset: 2

Views

Author

Emeric Deutsch, Jun 22 2016

Keywords

Examples

			a(4) = 6 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and, clearly, they have 3,1,1,0,1 columns of odd length.
		

Crossrefs

Programs

  • Maple
    Q := sqrt((1-z)*(1-3*z-z^2-z^3)): g := (((1-z)*(1-z-z^2-z^3)-(1-z^2)*Q)*(1/2))/((1+z^2)*Q): gser := series(g, z = 0, 40): seq(coeff(gser, z, m), m = 2 .. 35);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<7, [0$2, 1, 2, 6, 20, 64]
           [n+1], ((n-1)*(55*n-178)*a(n-1)-(2*(n-2))*(32*n-143)*
           a(n-2)+(501-370*n+69*n^2)*a(n-3)-(524-443*n+64*n^2)*
           a(n-4)+(526-215*n+21*n^2)*a(n-5)-(4*(3*n+2))*(n-6)*
           a(n-6)+(n-7)*(-29+7*n)*a(n-7))/ (n*(12*n-35)))
        end:
    seq(a(n), n=2..35);  # Alois P. Heinz, Jun 23 2016
  • Mathematica
    Q = Sqrt[(1-z)*(1-3*z-z^2-z^3)]; g = (((1-z)*(1-z-z^2-z^3) - (1-z^2)*Q)*(1/2))/((1+z^2)*Q); gser = g + O[z]^40; CoefficientList[gser, z][[3 ;; -1]] (* Jean-François Alcover, Oct 04 2016, adapted from Maple *)

Formula

G.f.: g(z) = ((1-z)(1-z-z^2-z^3)-(1-z^2)Q)/(2(1+z^2)*Q), where Q = sqrt((1-z)(1-3z-z^2-z^3)).
a(n) = Sum(k*A273901(n,k), k>=0).
D-finite with recurrence n*(12*n-35)*a(n) -(n-1)*(55*n-178)*a(n-1) +2*(n-2)*(32*n-143)*a(n-2) +(-69*n^2+370*n-501)*a(n-3) +(64*n^2-443*n+524)*a(n-4) +(-21*n^2+215*n-526)*a(n-5) +4*(3*n+2)*(n-6)*a(n-6) -(7*n-29)*(n-7)*a(n-7)=0. - R. J. Mathar, Jul 26 2022

A273904 Number of even-length columns in all bargraphs having semiperimeter n (n>=2).

Original entry on oeis.org

0, 1, 4, 13, 44, 149, 498, 1656, 5498, 18236, 60456, 200409, 664464, 2203755, 7311894, 24271290, 80605250, 267821525, 890305418, 2961015981, 9852481830, 32798011430, 109229396466, 363927233758, 1213012655490, 4044684629394, 13491663770344
Offset: 2

Views

Author

Emeric Deutsch, Jun 23 2016

Keywords

Examples

			a(4) = 4 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and, clearly, they have 0,1,1,2,0 columns of even length.
		

Crossrefs

Programs

  • Maple
    Q := sqrt((1-z)*(1-3*z-z^2-z^3)): g := (((1-z)*(1-3*z+z^2-z^3)-(1-z)^2*Q)*(1/2))/(z*(1+z^2)*Q): gser := series(g, z = 0, 40): seq(coeff(gser, z, m), m = 2 .. 35);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<7, [0$3, 1, 4, 13, 44]
          [n+1], ((7*n-22)*(n-6)*a(n-7) -(5*n^2-21*n+6)*a(n-6)+
          (21*n^2-180*n+404)*a(n-5) -(43*n^2-265*n+332)*a(n-4)
          +(41*n^2-226*n+308)*a(n-3) -(43*n^2-257*n+308)*a(n-2)
          +(27*n^2-110*n+36)*a(n-1))/ ((n+1)*(5*n-18)))
        end:
    seq(a(n), n=2..40);  # Alois P. Heinz, Jun 24 2016
  • Mathematica
    Q = Sqrt[(1-z)*(1-3*z-z^2-z^3)]; g = (((1-z)*(1-3*z+z^2-z^3) - (1-z)^2 * Q)*(1/2))/(z*(1+z^2)*Q); gser = g + O[z]^40; CoefficientList[gser, z][[3 ;; -1]] (* Jean-François Alcover, Oct 04 2016, adapted from Maple *)

Formula

G.f.: g(z)=((1-z)(1-3z+z^2-z^3)-(1-z)^2*Q)/(2z(1+z^2)*Q), where Q = sqrt((1-z)(1-3z-z^2-z^3)).
a(n) = Sum(k*A273903(n,k), k>=0).

A273901 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k odd-length columns (n>=2, k>=0).

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 3, 0, 1, 2, 4, 6, 0, 1, 4, 11, 9, 10, 0, 1, 8, 24, 33, 16, 15, 0, 1, 16, 56, 80, 76, 25, 21, 0, 1, 33, 128, 218, 200, 150, 36, 28, 0, 1, 69, 297, 558, 630, 420, 267, 49, 36, 0, 1, 146, 688, 1445, 1776, 1515, 784, 441, 64, 45, 0, 1, 312, 1601, 3684, 5091, 4635, 3213, 1344, 688, 81, 55, 0, 1
Offset: 2

Views

Author

Emeric Deutsch, Jun 22 2016

Keywords

Comments

Number of entries in row n is n.
Sum of entries in row n = A082582(n).
T(n,0) = A004149(n-1).
Sum(k*T(n,k), k>=0) = A273902(n).

Examples

			Row 4 is 1,3,0,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and, clearly, they have 3, 1, 1, 0, 1 columns of odd length.
Triangle starts
0,1;
1,0,1;
1,3,0,1;
2,4,6,0,1;
4,11,9,10,0,1
		

Crossrefs

Programs

  • Maple
    eq := z*(1+t*z^2)*f^2-(1-z-t*z+t*z^2-t*z^4-z^3-z^2-t*z^3)*f+z^2*(t*z^2+z-t*z+t) = 0: f:= RootOf(eq,f): fser:=simplify(series(f, z = 0,15)): for n from 2 to 12 do P[n] := sort(coeff(fser, z, n)) end do: for n from 2 to 12 do seq(coeff(P[n],t,k),k=0..n-1)end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t) option remember; expand(`if`(n=0, 1-t,
          `if`(t<0, 0, b(n-1, y+1, 1))+ `if`(t>0 or y<2, 0,
           b(n, y-1, -1))+ `if`(y<1, 0, b(n-1, y, 0)*z^
          `if`(y::odd, 1, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..n-1))(b(n, 0$2)):
    seq(lprint(T(n)), n=2..15);  # Alois P. Heinz, Jun 24 2016
  • Mathematica
    b[n_, y_, t_] := b[n, y, t] = Expand[If[n==0, 1-t, If[t<0, 0, b[n-1, y+1, 1]] + If[t>0 || y<2, 0, b[n, y-1, -1]] + If[y<1, 0, b[n-1, y, 0]*z^If[OddQ[y], 1, 0]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 0, n-1}]][b[n, 0, 0]]; Table[T[n], {n, 2, 15}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)

Formula

G.f.: G = G(t,z) satisfies aG^2 + bG + c = 0, where a = z(1+tz^2), b = tz^3 + z^2 + z^3 + tz^4 - tz^2 + tz + z - 1, c = z^2*(tz^2 + z - tz + t).
The trivariate g.f. G(t,s,z), where t (s) marks number of odd-length (even-length) columns and z marks semiperimeter, satisfies AG^2 + BG + C = 0, where A = z(tsz^2 - tsz + tz +s), B = tsz^4+(t+s)z^3+(1-ts)z^2+(t+s)z-1, C = tsz^4+s(1-t)z^3+tz^2.
Showing 1-3 of 3 results.