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.

A385601 Expansion of e.g.f. cosh(x)^2*(x+x^2/2).

Original entry on oeis.org

0, 1, 1, 6, 12, 40, 120, 224, 896, 1152, 5760, 5632, 33792, 26624, 186368, 122880, 983040, 557056, 5013504, 2490368, 24903680, 11010048, 121110528, 48234496, 578813952, 209715200, 2726297600, 905969664, 12683575296, 3892314112, 58384711680, 16642998272, 266287972352, 70866960384
Offset: 0

Views

Author

Enrique Navarrete, Jul 04 2025

Keywords

Comments

a(n) is the number of ternary strings of length n that contain one or two 1's, an even number of 0's, and an even number of 2's.
A229580 and (1/3)*A229679 interleaved.

Examples

			a(5) = 40 since the strings are the 5 permutations of 10000, the 5 permutations of 12222 and the 30 permutations of 10022.
a(6) = 120 since the strings are the 15 permutations of 110000, the 90 permutations of 110022, and the 15 permutations of 112222.
		

Crossrefs

Formula

a(n) = n*2^(n-2) for n odd, n >= 3.
a(n) = binomial(n,2)*2^(n-3) for n even, n >= 4.
G.f.: x*(1 + x - 6*x^2 + 16*x^4 + 24*x^5 - 32*x^6 - 32*x^7)/(1 - 4*x^2)^3. - Stefano Spezia, Jul 04 2025