Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A159916
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A159916 Triangle T[m,n] = number of subsets of {1,...,m} with n elements having an odd sum, 1 <= n <= m. +0
7
1, 1, 1, 2, 2, 0, 2, 4, 2, 0, 3, 6, 4, 2, 1, 3, 9, 10, 6, 3, 1, 4, 12, 16, 16, 12, 4, 0, 4, 16, 28, 32, 28, 16, 4, 0, 5, 20, 40, 60, 66, 44, 16, 4, 1, 5, 25, 60, 100, 126, 110, 60, 20, 5, 1, 6, 30, 80, 160, 236, 236, 160, 80, 30, 6, 0, 6, 36, 110, 240, 396, 472, 396, 240, 110, 36, 6 (list; table; graph; listen)
OFFSET

1,4

COMMENT

One could extend the triangle to include values for m=0 and/or n=0, but these correspond to empty sets and would always be 0. The first odd value for odd m and 1<n<m is T[13,5] = 651.

LINKS

Project Euler, Problem 242: Odd Triplets, April 25, 2009.

FORMULA

T[m,m] = A133872(m-1), T[m,1] = A004526(m+1).

EXAMPLE

The triangle starts:

(m=1) 1,

(m=2) 1,1,

(m=3) 2,2,0,

(m=4) 2,4,2,0,

(m=5) 3,6,4,2,1,

...

T(5,3)=4, since the set {1,2,3,4,5} has four 3-element subsets having an odd sum of elements, namely {1,2,4}, {1,3,5}, {2,3,4} and {2,4,5}.

PROGRAM

(PARI) T(n, k)=sum( i=2^k-1, 2^n-2^(n-k), norml2(binary(i))==k & sum(j=0, n\2, bittest(i, 2*j))%2 )

CROSSREFS

Sequence in context: A102706 A105673 A074823 this_sequence A159286 A006462 A008281

Adjacent sequences: A159913 A159914 A159915 this_sequence A159917 A159918 A159919

KEYWORD

nonn,tabl

AUTHOR

M. F. Hasler (Maximilian.Hasler(AT)gmail.com), Apr 30 2009

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 November 23 17:09 EST 2009. Contains 167438 sequences.


AT&T Labs Research