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.

A383608 Expansion of e.g.f. (1+x)*cosh(x)^2.

Original entry on oeis.org

1, 1, 2, 6, 8, 40, 32, 224, 128, 1152, 512, 5632, 2048, 26624, 8192, 122880, 32768, 557056, 131072, 2490368, 524288, 11010048, 2097152, 48234496, 8388608, 209715200, 33554432, 905969664, 134217728, 3892314112, 536870912, 16642998272, 2147483648, 70866960384, 8589934592
Offset: 0

Views

Author

Enrique Navarrete, May 01 2025

Keywords

Comments

a(n) is the number of ternary strings of length n with an even number of 0s and 2s and one or no 1s.
A081294 and A229580 interleaved.

Examples

			a(5)=40 since the strings are the 30 permutations of 00221, the 5 permutations of 00001, and the 5 permutations of 22221.
		

Crossrefs

Formula

a(n)=2^(n-1) for n even, n > 0, a(0)=1.
a(n)=n*2^(n-2) for n odd, n > 1, a(1)=1.
G.f.: (1 + x - 6*x^2 - 2*x^3 + 8*x^4 + 8*x^5)/(1 - 4*x^2)^2. - Stefano Spezia, May 02 2025
a(n) = 8*a(n-2) - 16*a(n-4), n > 5.