Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A113980
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A113980 Number of compositions of n with an odd number of 1's. +0
1
1, 0, 3, 2, 10, 12, 36, 56, 136, 240, 528, 992, 2080, 4032, 8256, 16256, 32896, 65280, 131328, 261632, 524800, 1047552, 2098176, 4192256, 8390656, 16773120, 33558528, 67100672, 134225920, 268419072, 536887296, 1073709056, 2147516416 (list; graph; listen)
OFFSET

1,3

FORMULA

2^(n-2)-2^((n-2)/2) if n is even, else 2^(n-2)+2^((n-3)/2).

G.f.=z(1-z)^2/[(1-2z)(1-2z^2)]. - Emeric Deutsch (deutsch(AT)duke.poly.edu), Feb 03 2006

EXAMPLE

a(4)=2 because only the compositions 31 and 13 of 4 have an odd number of 1's (the other compositions are 4,22,211,121,112, and 1111).

MAPLE

a:=proc(n) if n mod 2 = 0 then 2^(n-2)-2^((n-2)/2) else 2^(n-2)+2^((n-3)/2) fi end: seq(a(n), n=1..38); (Deutsch)

MATHEMATICA

f[n_] := If[EvenQ[n], 2^(n - 2) - 2^((n - 2)/2), 2^(n - 2) + 2^((n - 3)/2)]; Array[f, 34] (* Robert G. Wilson v *)

CROSSREFS

Cf. A020522, A007582, A063083, A100818, A092295, A111752, A111753, A111723, A111724, A088336, A088506.

Cf. A105422.

Adjacent sequences: A113977 A113978 A113979 this_sequence A113981 A113982 A113983

Sequence in context: A103245 A019242 A064367 this_sequence A095675 A006743 A091811

KEYWORD

easy,nonn

AUTHOR

Vladeta Jovovic (vladeta(AT)Eunet.yu), Jan 31 2006

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(at)rgwv.com) and Emeric Deutsch (deutsch(AT)duke.poly.edu), Feb 01 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 13 20:18 EDT 2008. Contains 145016 sequences.


AT&T Labs Research