# How to show factorial in expanded form with variables

When evaluating the following

(Factorial[n + 1]/Factorial[(n + 1) - (k + 1)])


with Mathematica 9, the result is sent to output as

(1 + n)!/((n + 1) - (k + 1))!


I would like to show the expanded (if that's the correct term) form of the result , if possible, to show for example

(n + 1)n(n - 1)...(n+1-k)


Is there a function like Expand to accomplish this?

-
Think again about what do you want as a result. ... isn't valid syntax in Mathematica –  belisarius Sep 23 '13 at 1:34
How would you know the bounds for the expansion? What exactly do you want for output? –  Mr.Wizard Sep 23 '13 at 3:16
Your indeterminate product can be represented Product[i, {i, n + 1 - k, n + 1}], but Product evaluates to Pochhammer[1 - k + n, 1 + k]. One could perhaps format Pochhammer to display as you wish. Would that be what you're after? –  Michael E2 Sep 23 '13 at 12:44

It is a nonstandard syntax but it can be easily implemented with UpValues

FactorialExpand[expr_] :=
expr /. Binomial[n_, k_] :> n!/k!/(n - k)! /. Factorial[x_] :> ProductSequence[1, x];

ProductSequence /: ProductSequence[a_, b1_]/ProductSequence[a_, b2_] :=
ProductSequence[b2 + 1, b1];

MakeBoxes[ProductSequence[a_, b_], StandardForm] ^:=
RowBox[{MakeBoxes[#1 #2], "...", MakeBoxes[#3 #4]}] &[a, a + 1, b - 1, b];

(1 + n)!/((n + 1) - (k + 1))! // FactorialExpand

(1 - k + n) (2 - k + n) ... n (1 + n)


I also add Binomial expansion

Binomial[n, k] // FactorialExpand

((1 + k) (2 + k) ... (-1 + n) n)/(1 2 ... (-1 - k + n) (-k + n))

-