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.

A273347 The sum of the areas of the bargraphs of semiperimeter n (n>=2).

Original entry on oeis.org

1, 4, 16, 60, 218, 778, 2744, 9600, 33391, 115638, 399137, 1374050, 4720272, 16187632, 55434424, 189607406, 647872199, 2211794804, 7545239986, 25722676402, 87641357150, 298456587038, 1015914399813, 3456670564220, 11757143968393, 39976448714086, 135887220346719
Offset: 2

Views

Author

Emeric Deutsch, Jun 03 2016

Keywords

Examples

			a(4) = 16  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, the sum of their areas is 3 + 3 + 3 + 4 + 3 = 16.
		

References

  • A. Blecher, C. Brennan, and A. Knopfmacher, Combinatorial parameters in bargraphs (preprint).

Crossrefs

Programs

  • Maple
    Q := sqrt(1-4*z+2*z^2+z^4): g := z^2*(2-z-z^3-z*Q)^2/(1-4*z+z^4+Q+z^2*(2+Q))^2; 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, 4, 16, 60, 218, 778][n+1],
          ((69-115*n+28*n^2)*a(n-1) -(264-265*n+52*n^2)*a(n-2)
           +(3*(29-29*n+4*n^2))*a(n-3) -(3*(10-21*n+4*n^2))*a(n-4)
           +(4*n-9)*(5*n-29)*a(n-5) +(4*n-13)*(n-6)*a(n-6)
           +(n-7)*(4*n-9)*a(n-7))/(n*(4*n-13)))
        end:
    seq(a(n), n=2..30);  # Alois P. Heinz, Jun 04 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^y]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 1, Exponent[p, z]}]][b[n, 0, 0]]; a[n_] := (row = T[n]; row.Range[Length[row]]); Table[a[n], {n, 2, 30}] (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz's Maple code for A273346 *)

Formula

G.f.: g(z) = z^2 (2 - z - z^3 - z q )^2 /(1 - 4z + z^4 + q + z^2 q)^2, where q = sqrt(1 - 4z + 2z^2 + z^4) (see Section 4.3 of the Blecher et al. reference).
a(n) = Sum(k*A273346(n,k), k>=1).
a(n) = ((69-115*n+28*n^2)*a(n-1) -(264-265*n+52*n^2)*a(n-2) +(3*(29-29*n+4*n^2))*a(n-3) -(3*(10-21*n+4*n^2))*a(n-4) +(4*n-9) * (5*n-29)*a(n-5) +(4*n-13)*(n-6)*a(n-6) +(n-7)*(4*n-9)*a(n-7))/ (n*(4*n-13)) for n>=7. - Alois P. Heinz, Jun 04 2016

A274207 Number T(n,k) of bargraphs of site-perimeter n having area k; triangle T(n,k), n>=4, floor((n-1)/2)<=k<=floor(((n-1)^2+3)/12), read by rows.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 4, 2, 4, 7, 1, 6, 6, 10, 4, 2, 9, 13, 14, 12, 2, 8, 13, 22, 18, 24, 10, 2, 2, 15, 27, 40, 29, 38, 28, 12, 2, 10, 24, 45, 65, 59, 58, 56, 40, 16, 4, 2, 23, 52, 84, 104, 112, 100, 95, 88, 56, 28, 7, 1, 12, 40, 92, 148, 181, 205, 191, 172, 163, 132, 96, 48, 16, 4
Offset: 4

Views

Author

Alois P. Heinz, Jun 13 2016

Keywords

Comments

A bargraph is a polyomino whose bottom is a segment of the nonnegative x-axis and whose upper part is a lattice path starting at (0,0) and ending with its first return to the x-axis using steps U=(0,1), D=(0,-1) and H=(1,0), where UD and DU are not allowed.
The site-perimeter of a polyomino is the number of exterior cells having a common edge with at least one polyomino cell.

Examples

			              _
T(4,1) = 1:  |_|
              _
             | |     ___
T(6,2) = 2:  |_|    |___|
              _        _
             | |_    _| |
T(7,3) = 2:  |___|  |___|
              _
             | |
             | |     _____
T(8,3) = 2:  |_|    |_____|
              ___      _
             |   |   _| |_
T(8,4) = 2:  |___|  |_____|
              _        _
             | |      | |   _            _
             | |_    _| |  | |___    ___| |
T(9,4) = 4:  |___|  |___|  |_____|  |_____|
              _        _
             | |_    _| |   ___        ___
             |   |  |   |  |   |_    _|   |
T(9,5) = 4:  |___|  |___|  |_____|  |_____|
                _
              _| |_
             |     |
T(10,7) = 1: |_____|
.
Triangle T(n,k) begins:
n\k: 1 2 3 4 5 6  7  8  9 10  11  12  13 14 15 16 17 . .
---+----------------------------------------------------
04 : 1
05 :
06 :   2
07 :     2
08 :     2 2
09 :       4 4
10 :       2 4 7  1
11 :         6 6 10  4
12 :         2 9 13 14 12  2
13 :           8 13 22 18 24  10   2
14 :           2 15 27 40 29  38  28  12  2
15 :             10 24 45 65  59  58  56 40 16  4
16 :              2 23 52 84 104 112 100 95 88 56 28 7 1
		

Crossrefs

Row sums give A075126.
Column sums give A000079(k-1).

Programs

  • Maple
    b:= proc(n, y, t, w) option remember; `if`(n<0, 0, `if`(n=0, (1-t),
         `if`(t<0, 0, b(n-`if`(w>0 or t=0, 1, 2), y+1, 1, max(0, w-1)))+
         `if`(t>0 or y<2, 0, b(n, y-1, -1, `if`(t=0, 1, w+1))) +expand(
         `if`(y<1, 0, z^y*b(n-`if`(t<0, 1, 2), y, 0, `if`(t<0, w, 0))))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i),
             i= iquo(n-1, 2)..iquo((n-1)^2+3, 12)))(b(n, 0, 1, 0)):
    seq(T(n), n=4..20);
  • Mathematica
    b[n_, y_, t_, w_] := b[n, y, t, w] = If[n<0, 0, If[n==0, (1-t), If[t<0, 0, b[n - If[w>0 || t==0, 1, 2], y+1, 1, Max[0, w-1]]] + If[t>0 || y<2, 0, b[n, y-1, -1, If[t==0, 1, w+1]]] + Expand[If[y<1, 0, z^y*b[n - If[t<0, 1, 2], y, 0, If[t<0, w, 0]]]]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Quotient[n-1, 2], Quotient[(n-1)^2 + 3, 12]}]][b[n, 0, 1, 0]];
    Table[T[n], {n, 4, 20}] // Flatten (* Jean-François Alcover, Apr 28 2018, after Alois P. Heinz *)

Formula

Sum_{k=floor((n-1)/2)..floor(((n-1)^2+3)/12)} k * T(n,k) = A274208(n).
Sum_{n>=4} k * T(n,k) = A001787(k).
Sum_{n>=4} n * T(n,k) = A274217(k).

A273348 The sum of the semiperimeters of the bargraphs of area n (n>=1).

Original entry on oeis.org

2, 6, 16, 39, 92, 211, 476, 1059, 2332, 5091, 11036, 23779, 50972, 108771, 231196, 489699, 1034012, 2177251, 4572956, 9582819, 20039452, 41826531, 87148316, 181287139, 376555292, 781072611, 1618069276, 3347986659, 6919669532, 14286731491, 29468247836, 60726065379, 125031270172, 257220819171, 528758195996
Offset: 1

Views

Author

Emeric Deutsch, Jun 03 2016

Keywords

Examples

			a(4) = 39 because the 8 bargraphs of area 4 correspond to the compositions [2,2],[4],[3,1],[1,3],[2,1,1],[1,2,1],[1,1,2],[1,1,1,1] and the sum of their semiperimeters is 4 + 7*5 = 39.
		

Crossrefs

Programs

  • Maple
    a := proc(n) (5/12)*n*2^n+(29/36)*2^n-(1/18)*(-1)^n-1/2 end proc:
    seq(a(n), n = 1 .. 35);
  • Mathematica
    LinearRecurrence[{4, -3, -4, 4}, {2, 6, 16, 39}, 35] (* Jean-François Alcover, Nov 27 2017 *)
  • PARI
    first(n) = Vec(x*(2-2*x-2*x^2+x^3)/((1-x^2)*(1-2*x)^2) + O(x^(n+1))) \\ Iain Fox, Nov 27 2017

Formula

G.f.: g = t(2-2t-2t^2+t^3)/((1-t^2)(1-2t)^2).
a(n) = (15*n2^n+29*2^n-2(-1)^n-18)/36.
a(n) = Sum_{k>=2} k * A273346(k,n).
Showing 1-3 of 3 results.