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.
%I A374836 #11 Jul 21 2024 12:48:31 %S A374836 0,0,1,0,6,21,114,597,3278,18420,105618,615331,3632352,21678975, %T A374836 130598887,793085742,4849791942,29838388707,184573315170, %U A374836 1147219365762,7161284719412,44876343104655,282206695488603,1780341161583746,11264338644455334,71461150894269030 %N A374836 Number of ternary paths of length 3*n having exactly 2 hills. %H A374836 Naiomi Cameron and J. E. McLeod, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/McLeod/mcleod3.html">Returns and Hills on Generalized Dyck Paths</a>, Journal of Integer Sequences, Vol. 19, 2016, #16.6.1. %F A374836 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). %F A374836 G.f.: x^2 * (g/(1 + x*g))^3, where g = 1 + x*g^3. %o A374836 (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)); %Y A374836 Column k=2 of A101371. %Y A374836 Cf. A001764, A023053, A294527. %K A374836 nonn %O A374836 0,5 %A A374836 _Seiichi Manyama_, Jul 21 2024