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

A273719 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k horizontal steps in the peaks (n>=2, k>=1).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 8, 3, 1, 1, 21, 9, 3, 1, 1, 55, 27, 10, 3, 1, 1, 144, 82, 33, 11, 3, 1, 1, 377, 251, 110, 39, 12, 3, 1, 1, 987, 770, 368, 139, 45, 13, 3, 1, 1, 2584, 2358, 1229, 495, 169, 51, 14, 3, 1, 1, 6765, 7191, 4085, 1755, 632, 200, 57, 15, 3, 1, 1
Offset: 2

Views

Author

Emeric Deutsch, Jun 01 2016

Keywords

Comments

Number of entries in row n is n-1.
Sum of entries in row n = A082582(n).
T(n,1) = A088305(n-2) = F(2n-4) where F(n) are the Fibonacci numbers A000045.
Sum(k*T(n,k), k>=0) = A273720(n).

Examples

			Row 4 is 3,1,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 the corresponding drawings show that they have 3,1,1,2,1 horizontal steps in their peaks.
Triangle starts
1;
1,1;
3,1,1;
8,3,1,1;
21,9,3,1,1
		

Crossrefs

Programs

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

Formula

G.f.: G(s,z), where s marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies the equation given in the Maple program.
G.f.: G(w,z), where w marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies eq. (7) of the Blecher et al. reference, where one has to set x = z and y = z.
The trivariate g.f. G = G(t,s,z), where t marks number of peaks, s marks number of horizontal steps in the peaks, and z marks semiperimeter, satisfies z*(1-z)*(1-s*z)*G^2-(1-3*z-s*z+z^2+3*s*z^2-s*z^3+t*s*z^3-t*s*z^4)*G + t*s*z^2*(1-z)^2 = 0.

A277973 Sum of horizontal positions of the first peak in all bargraphs of semiperimeter n.

Original entry on oeis.org

0, 0, 0, 1, 6, 25, 91, 311, 1029, 3346, 10778, 34544, 110444, 352785, 1126885, 3601617, 11521648, 36899528, 118322448, 379908707, 1221423149, 3932113059, 12675055399, 40909511880, 132200481507, 427718677728, 1385419058692, 4492446685542, 14582927712740, 47385785436719
Offset: 1

Views

Author

Arnold Knopfmacher, Nov 07 2016

Keywords

Comments

Horizontal position is x-coordinate of the start of the leftmost horizontal step of the first peak.

Examples

			For n = 4, a(4) = 1, as only the bargraph with first column of height one and second column of height two has horizontal position 1, all other cases are zero.
		

Crossrefs

Programs

  • PARI
    seq(n) = my(r=sqrt((1 - x)*(1 - 3*x - x^2 - x^3) + O(x^(n-2)))); Vec(2*x^3*(1 + x^2 - r) / ((1 - x)*(1 - 2*x - x^2 + r)^2), -n) \\ Andrew Howroyd, Jan 12 2024

Formula

G.f.: (2*x^3*(x^2-sqrt(x^4+2*x^2-4*x+1)+1)) / ((1-x)*(-x^2+sqrt(x^4+2*x^2-4*x+1)-2*x+1)^2).

A277999 Sum of distances between leftmost and rightmost peaks in all bargraphs of semiperimeter n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 9, 53, 261, 1165, 4887, 19642, 76519, 291095, 1086946, 3998430, 14530223, 52272218, 186467253, 660449671, 2325124444, 8143334776, 28393762841, 98621419068, 341403900888, 1178425064256, 4057244213071, 13937739553781, 47786215201214, 163554669548711
Offset: 1

Views

Author

Arnold Knopfmacher, Nov 08 2016

Keywords

Examples

			a(6)=1 since the bargraph with column heights 2,1,2 has a distance of 1 between first and last peak. All other bargraphs of semiperimeter 6 have at most one peak, hence 0 difference.
		

Crossrefs

Programs

  • PARI
    my(x = 'x + O('x^30)); sqx = sqrt(x^4+2*x^2-4*x+1); concat(vector(5), Vec(-(4*x^6*(3-2*x^3+3*x^4 - sqx + x^2*(4-3*sqx) + 2*x*(sqx - 4))/((x^2-3*x+1)*sqx*(-1+2*x+x^2-sqx)^3)))) \\ Michel Marcus, Feb 25 2019

Formula

G.f.: -(4*x^6*(3-2*x^3+3*x^4 - sqx + x^2*(4-3*sqx) + 2*x*(sqx - 4))/((x^2-3*x+1)*sqx*(-1+2*x+x^2-sqx)^3)) where sqx = sqrt(x^4+2*x^2-4*x+1).

A278134 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k horizontal steps in the valleys (n>=2, k>=0).

Original entry on oeis.org

1, 2, 5, 13, 34, 1, 89, 7, 1, 233, 34, 7, 1, 610, 141, 35, 7, 1, 1597, 534, 152, 36, 7, 1, 4181, 1905, 611, 163, 37, 7, 1, 10946, 6512, 2338, 689, 174, 38, 7, 1, 28657, 21557, 8641, 2787, 768, 185, 39, 7, 1, 75025, 69593, 31104, 10921, 3252, 848, 196, 40, 7, 1
Offset: 2

Views

Author

Emeric Deutsch, Jan 06 2017

Keywords

Comments

Number of entries in rows 2,3,4,5 is 1; number of entries in row n (n>=5) is n-4.
Sum of entries in row n = A082582(n).
T(n,0) = A001519(n-1) = F(2n-3), where F(n) are the Fibonacci numbers A000045.
Sum(k*T(n,k), k>=0) = A278135(n).

Examples

			Row 6 is 34,1 because among the 35 (=A082582(6)) bargraphs of semiperimeter 6 only one has a valley; it corresponds to the composition [2,1,2] and its width is 1.
Triangle starts:
1;
2;
5;
13;
34, 1;
89, 7, 1
		

Crossrefs

Programs

  • Maple
    a := t*z*(1-z)^2: b := 1-3*z-t*z+z^2+3*t*z^2-t*z^4: c := z^2*(1-z)*(1-t*z): G := RootOf(a*G^2-b*G+c = 0, G): Gser := simplify(series(G, z = 0, 20)): for n from 2 to 16 do P[n] := sort(coeff(Gser, z, n)) end do: 1; 2; 5; 13; for n from 6 to 16 do seq(coeff(P[n], t, j), j = 0 .. n-5) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z), where t marks number of horizontal steps in the valleys and z marks semiperimeter, satisfies aG^2 - bG + c = 0, where a = tz(1-z)^2, b = 1 - 3z - tz + z^2 + 3t*z^2 -tz^4, c = z^2*(1-z)(1-tz).

A278135 Number of horizontal steps in the valleys of all bargraphs having semiperimeter n (n >=2).

Original entry on oeis.org

0, 0, 0, 0, 1, 9, 51, 236, 979, 3805, 14190, 51488, 183333, 644121, 2241127, 7741378, 26593899, 90971184, 310159487, 1054693058, 3578948942, 12124108632, 41015411703, 138597840864, 467913141789, 1578497031981, 5321685955902, 17931990439148, 60397664457791, 203355625940891
Offset: 2

Views

Author

Emeric Deutsch, Jan 06 2017

Keywords

Examples

			a(6) = 1 because among the 35 (=A082582(6)) bargraphs of semiperimeter 6 only one has a valley; it corresponds to the composition [2,1,2] and its width is 1.
		

Crossrefs

Programs

  • Maple
    Q := sqrt((1-z)*(1-3*z-z^2-z^3)): R := 1-7*z+17*z^2-18*z^3+9*z^4-3*z^5+z^6: g := 2*z^6/(Q*(R+(1-3*z+z^2)*(1-z)^2*Q)): gser := series(g, z = 0, 35): seq(coeff(gser, z, j), j = 2 .. 33);

Formula

G.f.: g(z) = 2z^6/(Q(R + (1-3z+z^2)(1-z)^2*Q)), where Q = sqrt((1-z)(1-3z-z^2-z^3)) and R = 1 - 7z + 17z^2 - 18z^3 + 9z^4 - 3z^5 + z^6.
a(n) = Sum(k*A278134(n,k), k>=0).
Conjecture D-finite with recurrence -7*(n+1)*(n-6)*a(n) +3*(13*n^2-69*n+14)*a(n-1) +(-61*n^2+331*n-256)*a(n-2) +3*(11*n^2-59*n+68)
*a(n-3) -(n-2)*(9*n-25)*a(n-4) +(9*n^2-55*n+80)*a(n-5) -(3*n-4)*(n-5)*a(n-6) -(n-5)*(n-6)*a(n-7)=0. - R. J. Mathar, Jul 22 2022
Showing 1-5 of 5 results.