Re: recognizing integer numbers

• To: mathgroup at smc.vnet.net
• Subject: [mg34040] Re: [mg33924] recognizing integer numbers
• From: BobHanlon at aol.com
• Date: Sat, 27 Apr 2002 00:57:12 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```In a message dated 4/23/02 8:27:20 AM, manuel_ballester at yahoo.com writes:

>I need some help with the following. I am trying mathematica to solve
>some sums for me. The thing is that I don't know how to tell
>mathematica that certain numbers are non-negative integers and some
>answers that I would expect as (for example) n! are given as
>Gamma[n-1] and so on, sometimes Hypergeometric functions are also
>involved. Example:
>
>Sum[Binomial[2*m+1,k]*( a^k*b^(2*m+1-k)+ b^k*a^(2*m+1-k) ),{k,0,m}]
>
>if m is a natural number then the answer to this is simply
>(a+b)^(2*m+1)
>
>but since I don't know how to say this to mathematica it gives me an
>Simplify and FullSimplify.
>

s1 = FullSimplify[Sum[Binomial[2*m+1,k]*
(a^k*b^(2*m+1-k)+b^k*a^(2*m+1-k)),
{k,0,m}], Element[m, Integers]];

The same sum in reverse order is

s2 = FullSimplify[Sum[(Binomial[2*m+1,k]*
(a^k*b^(2*m+1-k)+b^k*a^(2*m+1-k))) /.

k -> (m-k),{k,0,m}], Element[m, Integers]];

The result is then

Simplify[(s1+s2)/2]

(a + b)^(2*m + 1)

Bob Hanlon
Chantilly, VA  USA

```

• Prev by Date: Re: invisible graphics
• Next by Date: Re: Dynamic referencing AND hyperlinking for numbered equations
• Previous by thread: Re: recognizing integer numbers
• Next by thread: Re: Re: recognizing integer numbers