# Counting number of solutions for $x = (a-1)(b-2)(c-3)(d-4)(e-5)$

If $x = (a-1)(b-2)(c-3)(d-4)(e-5)$, where $a,b,c,d,e \in \mathbb{N}$ are distinct natural numbers less than 6. If x is a non zero integer, then the how to count the no of sets of possible values of $(a,b,c,d,e)$?

which is the fastest (pencil-paper) solution of this problem?

$\mathbb{N} = 1,2,3,\cdots$

-
A thing you can use to start is factore x and put it in the form $x=p_1^{\alpha_1} p_2^{\alpha_2} p_3^{\alpha_3} \cdots$. Then, necessarily, your factors $(a-1), (b-2), \cdots$ must be a combination of this factors of x ($p_1^{\alpha_1}, \cdots$). Remember the negatives products too. – GarouDan Nov 2 '11 at 0:09

## 5 Answers

I'll take "natural number" to mean at least 1 (so, in particular, not 0).

You've got five distinct natural numbers less than 6, that means you have to use each of the numbers 1, 2, 3, 4, 5 exactly once. So you have a permutation of the set $\lbrace1,2,3,4,5\rbrace$. The non-zero condition on the product says that this permutation can't have any fixed points. So the question is a disguised way of asking you about the number of derangements of 5 objects.

Now any good combinatorics text will tell you all about counting derangements; alternatively, just type the word into your favorite search engine and see what comes up.

-

do it manualy

here is all the possible values of (abcde) tht respect your constraints a= 2,3,4,5,6 b=1, 3,4,5,6 c=1,2, 4,5,6 d=1,2,3, 5,6 e=1,2,3,4, 6

there is that 5^5 caseq to studi

and less that 5^5 possible values of x

-
the solution a=1, b=2, c=3, d=4, e=5 is clear. How did you get the other solutions? – NoChance Nov 2 '11 at 4:11
The natural numbers must be less than 6, not less than or equal to 6. – Gerry Myerson Nov 2 '11 at 5:32
You missed the word "distinct" in the problem – Ross Millikan Sep 16 '13 at 21:43

for x to be a non zero solution, (a-1), (b-2).... can't be zero so possible values of a 2,3,4,5 similarly b= 1,3,4,5 and so on so possible combinations are 4*4*4*4*4 i.e. 4^5

-
You missed the word "distinct" in the problem. – Ross Millikan Sep 16 '13 at 21:42

As a,b,c,d,e can be natural and less then 6{1,2,3,4,5} but x cant be 0

Its a classical example of dearrangements.

A cant take 1 B cant take 2 C cant take 3 D cant take 4 E cant take 5

So its like filling 5 letters in 5 envelopes such that no letter goes to the designated envelope.

Dearrangements of 5 = 5!{1 - 1/1! + 1/2! - 1/3! + 1/4! - 1/5!} = 44.

-

It's hard to tell exactly what the OP is asking for, but I interpret the question to be asking about a function I'll call $f_5(x)$, which counts the number of permutations $(a,b,c,d,e)$ of $(1,2,3,4,5)$ for which $x=(a-1)(b-2)(c-3)(d-4)(e-5)$. It's rather cumbersome to compute the answer to this (especially if it's not what the OP means), so instead I'll give the answer for $f_4(x)$, defined in the analogous way:

$$f_4(-3)=2,\quad f_4(1)=1,\quad f_4(4)=2,\quad f_4(9)=1,\quad f_4(12)=2,\quad f_4(16)=1$$

and $f_4(x)=0$ for all other non-zero $x$. If you like, we also have $f_4(0)=15$.

Just to round things out, we also have

$$f_2(-1)=1,\quad f_3(-2)=1,\quad f_3(2)=1$$

Any guesses as to the number of non-zero $x$'s for which $f_5(x)$ takes a non-zero value?

Sorry, the answer is not $24$. If I did everything correctly, there are $12$ values for which $f_5(x)=1$ and $16$ values for which $f_5(x)=2$, for a total of $28$ non-zero $x$s with a non-zero values of $f_5(x)$.

-