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.

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