0

This question is similar to one here, but it's not the same.

So, I want to ask WolframAlpha with math input (I don't know natural language) if the following identity holds (of course it does, it's a recurrence for binomials):

$$\frac{n!}{k!(n-k)!} = \frac{(n-1)!}{k!(n-k-1)!}+\frac{(n-1)!}{(n-k)!(k-1)!}$$ for $n, k$ positive integers.

How can I do that?

My tries: first: Is \frac{n!}{k!(n-k)!} = frac{(n-1)!}{(n-k-1)!k!}+\frac{(n-1)!}{(n-k)!(k-1)!}? - gives it is not true - it gives counterexamples with negative fractions.

second: Is \frac{n!}{k!(n-k)!} = frac{(n-1)!}{(n-k-1)!k!}+\frac{(n-1)!}{(n-k)!(k-1)!} assuming n, k natural? - doesn't give an answer if it is true or not.

Alezigl
  • 128

1 Answers1

1

There are a couple of ways to do this:

(1) use Assuming and Element. For example:

Assuming[Element[n|k,Integers] && n > 0 && k > 0, some expression]

(2) use Refine. For example

Refine[something to refine, n > 0 && k > 0 && Element[n|k,Integers]]

(3) use Reduce. For example

Reduce[expression to reduce && n > 0 && k > 0, {n,k}, Integers]

Here are some examples on using assumptions from the official documentation: https://reference.wolfram.com/language/tutorial/AlgebraicManipulation.html#31833

Randy Marsh
  • 3,786
  • Thank you. If I type Refine[Factorial[n]/(Factorial[k] * Factorial[n - k]) == Factorial[n - 1]/(Factorial[n - k - 1] * Factorial[k] ) + Factorial[n - 1]/(Factorial[n - k] * Factorial[k - 1]) or any other function you provided I get the following error message: Oops, you've exceeded the maximum number of characters. – Alezigl Aug 20 '24 at 18:48
  • Another example which produces the same error problem: Assuming[Element[n|k,Integers] && n > 0 && k > 0, Factorial[n]/(Factorial[k] * Factorial[n - k]) == Factorial[n - 1]/(Factorial[n - k - 1] * Factorial[k] ) + Factorial[n - 1]/(Factorial[n - k] * Factorial[k - 1])] – Alezigl Aug 20 '24 at 19:10
  • Where are you doing this, WolframAlpha? What is in my answer is for Mathematica, since that's what was in your question. Note also that WolframAlpha and Mathematica aren't always interchangeable. – Randy Marsh Aug 21 '24 at 06:30
  • Oh, I didn't know that. Thanks for pointing that out. – Alezigl Aug 21 '24 at 08:27