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.

A374836 Number of ternary paths of length 3*n having exactly 2 hills.

Original entry on oeis.org

0, 0, 1, 0, 6, 21, 114, 597, 3278, 18420, 105618, 615331, 3632352, 21678975, 130598887, 793085742, 4849791942, 29838388707, 184573315170, 1147219365762, 7161284719412, 44876343104655, 282206695488603, 1780341161583746, 11264338644455334, 71461150894269030
Offset: 0

Views

Author

Seiichi Manyama, Jul 21 2024

Keywords

Crossrefs

Column k=2 of A101371.

Programs

  • PARI
    a(n) = sum(k=0, n-2, (-1)^k*(k+1)*(k+2)*(k+3)/(2*(2*n-1-k))*binomial(3*n-4-2*k, n-2-k));

Formula

a(n) = Sum_{k=0..n-2} (-1)^k * (k+1)*(k+2)*(k+3)/(2*(2*n-1-k)) * binomial(3*n-4-2*k,n-2-k).
G.f.: x^2 * (g/(1 + x*g))^3, where g = 1 + x*g^3.