# Check my math - Number of one-to-one functions $f$ from $\{1, \ldots, n\}$ to $\{1, \ldots, 2n-1\}$ such that $f(x) \neq 2x - 1$ for all $x$

What is the number of one-to-one functions $$f$$ from the set $$\{1, 2, \ldots, n\}$$ to the set $$\{1, 2, \ldots, 2n − 1\}$$ so that $$f(x) \neq 2x − 1$$ for all $$x$$?

I'm not sure if I did the question correctly, so please provide feedback. The total number of one-to-one functions is $$(2n-1)(2n-2) \ldots (n)$$ or $$\frac{(2n-1)!}{(n-1)!}$$. The number of one-to-one functions such that $$f(x) = 2x-1$$ is $$n$$. Thus, the total number of one-to-one functions such that $$f(x) \neq 2x-1$$ is: $$\frac{(2n-1)!}{(n-1)!} - n$$

• You want to discard the number of one to one functions such that $f(x)=2x-1$ for some $x$. Those are way more than $n$, for instance just considering the number of one to one functions such that $f(1)=1$ this is $(2n-1)!/(n-1)!$ – Julian Mejia Apr 19 at 2:42
• How would you go about finding the number of one-to-one functions such that f(x) = 2x-1? – Brownie Apr 20 at 22:08