# How many possibilities to arrange 0-9 in a special way (details in the body)

So I was trying to think about a problem to upload to Brilliant, and I came across a kind of difficult one that I'm not sure what's the right answer for. Try to arrange all the digits from 0-9(that's ten total) so that:

1. Every digit cannot be placed at the same place as its number (assuming we count places starting from 0), for example 0 can't be placed at the place 0.

2. As it concludes from the problem, no repetition is allowed. If I wrote 3 I can't choose it again.

Allowed arrangement: 9012345678, 1234567890

Digits representing places: 0123456789 0123456789

Explanation: As you can see, no digit in the arrangement is similar to the digit representing it place and no digit is repeated.

Forbidden arrangement: 0987654321,1123456789

Digits representing places: 0123456789 , 0 123456789

Explanation for the first number: 0 is placed at the place 0. Explanation for the second number: 1 appears more than once., 1 is located in the place 1.

The question: How many "allowed" arraignments can we make?

So my problem is that I have written a computer program using C# and I got the number 1,320,128, but the calculation I made by solving it (using combinatorics principles) brought me to 1,632,960. I prefer not to write here how exactly I got this numbers to encourage further examination and to prevent us from choosing similar ways and having similar mistakes. So I really hope at least one of my results is correct, and I can't wait to see how would you solve it! By the way, after we will confirm the solution and result I will post this problem and solution with credit to the solvers. Good luck and thank you very much!

Note by יונתן חופש
9 months, 1 week ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Hmm, I get $$1,334,961.$$ Here is the relevant wiki.

- 9 months, 1 week ago