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.

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

Original entry on oeis.org

1, 3, 8, 21, 57, 162, 479, 1458, 4528, 14259, 45349, 145289, 468121, 1515128, 4922145, 16040310, 52411294, 171646085, 563266323, 1851661113, 6096654978, 20101681834, 66362538332, 219336702948, 725692113292, 2403295565913, 7966021263923, 26425616887971
Offset: 2

Views

Author

Emeric Deutsch, Jun 01 2016

Keywords

Examples

			a(4) = 8 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.
		

Crossrefs

Programs

  • Maple
    g := (1/2)*z^2*(1-2*z+2*z^2-2*z^3+z^4+Q)/((1-z)^2*Q): Q := sqrt((1-z)^5*(1-3*z-z^2-z^3)): gser := series(g, z = 0, 35): seq(coeff(gser, z, n), n = 2 .. 32);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<6, [0$2, 1, 3, 8, 21][n+1],
         ((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2)
          +(2*(101-58*n+8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4)
          +(2*(n-6))*(2*n-5)*a(n-5)-(n-6)*(2*n-5)*a(n-6))/
          ((n-2)*(2*n-9)))
        end:
    seq(a(n), n=2..40);  # Alois P. Heinz, Jun 01 2016
  • Mathematica
    a[n_] := a[n] = If[n<6, {0, 0, 1, 3, 8, 21}[[n+1]], ((2*(3*n-7))*(2*n - 9)*a[n-1] - (254 - 155*n + 22*n^2)*a[n-2] + (2*(101 - 58*n + 8*n^2))*a[n - 3] - (86 - 47*n + 6*n^2)*a[n-4] + (2*(n-6))*(2*n - 5)*a[n-5] - (n-6)*(2*n - 5)*a[n-6])/((n-2)*(2*n - 9))]; Table[a[n], {n, 2, 40}] (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)

Formula

G.f.: g(z) = z^2*(1-2*z+2*z^2-2*z^3+z^4+Q)/(2*Q*(1-z)^2), where Q = sqrt((1-z)^5*(1-3*z-z^2-z^3)).
a(n) = Sum(k*A273719(n,k), k>=1).
a(n) = ((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2) +(2*(101 -58*n +8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4) +(2*(n-6))*(2*n-5)*a(n-5) -(n-6)*(2*n-5)*a(n-6))/((n-2)*(2*n-9)) for n>=6. - Alois P. Heinz, Jun 01 2016

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