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.

Showing 1-1 of 1 results.

A005674 a(n) = 2^(n-1) + 2^[ n/2 ] + 2^[ (n-1)/2 ] - F(n+3).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 10, 25, 63, 144, 327, 711, 1534, 3237, 6787, 14056, 28971, 59283, 120894, 245457, 497167, 1004256, 2025199, 4077007, 8198334, 16467597, 33052491, 66293208
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of compositions of n where mixing of even and odd summands occurs. That is, at least one even summand is bracketed by two odd summands, or vice versa. - Gregory L. Simay, Jul 27 2016

Examples

			a(6) = a(2*3) = 2^5 - f(9) + 3*2^2 = 32 - 34 + 12 = 10. The 10 compositions are (1,4,1), (3,2,1), (1,2,3), (2,1,2,1), (1,2,1,2), (2,1,1,2), (1,2,2,1), (1,2,1,1,1), (1,1,2,1,1), (1,1,1,2,1).
		

References

  • R. K. Guy, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A079289, A027558 divided by 2.

Programs

  • Maple
    A005674:=-z**4/(2*z-1)/(z**2+z-1)/(-1+2*z**2); # [Conjectured by Simon Plouffe in his 1992 dissertation.]

Formula

From Gregory L. Simay, Jul 27 2016: (Start)
If n=2k, then a(n) = 2^(n-1) - 2*A079289(n) + 2^(n/2 - 1) + F(n).
If n=2k-1, then a(n) = 2^(n-1) - 2*A079289(n) + F(n). (End)
Showing 1-1 of 1 results.