Rearrange the digits in ⟨125034⟩ to meet the rules below.
⟨5th 4th 3rd 2nd 1st 0th⟩
✅Match
⟨? ⋯ 5 (?+1) ⋯ 0 ⋯⟩ (?≠4)
⛔Avoid
⟨ ⁵ᵗʰa     ²ⁿᵈb   ⁰ᵗʰc ⟩, a > b > c
⟨⋯ a ⋯ 5 ⋯⟩, a = 0|1|2|4
⟦1,4⟧ ∋ 0
----- Information -----
✅ 「⟨? ⋯ 5 (?+1) ⋯ 0 ⋯⟩ (?≠4)」
• ?, 5, (?+1) are distinct digits.
• ? is at the 5th (leftmost) position.
• 5 and (?+1) are adjacent.
There are 36 permutations matching this pattern.
Examples: ⟨152034⟩, ⟨145203⟩, ⟨152340⟩.
⛔ 「⟨ ⁵ᵗʰa     ²ⁿᵈb   ⁰ᵗʰc ⟩, a > b > c」
There are 600 permutations avoiding this pattern.
Examples: ⟨502143⟩, ⟨104352⟩, ⟨314502⟩.
⛔ 「⟨⋯ a ⋯ 5 ⋯⟩, a = 0|1|2|4」
At least one of {0,1,2,4} is to the left of 5.
There are 144 permutations avoiding this pattern.
Examples: ⟨521340⟩, ⟨543120⟩, ⟨514023⟩.
⛔ 「⟦1,4⟧ ∋ 0」
Digit 0 is positioned between digits 1 and 4.
There are 480 permutations avoiding this pattern.
Examples: ⟨514302⟩, ⟨154302⟩, ⟨204531⟩.
#125034_v2.10
       ┌───┬───┬───┬───┬───┬───┐
       │5th│4th│3rd│2nd│1st│0th│▒
       ╞═══╪═══╪═══╪═══╪═══╪═══╡▒
Step 1 │   │ 5 │   │   │   │   │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 2 │ 3 │ 5 │   │   │   │   │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 3 │ 3 │ 5 │ 4 │   │   │   │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 4 │ 3 │ 5 │ 4 │   │   │ 2 │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 5 │ 3 │ 5 │ 4 │ 1 │   │ 2 │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 6 │ 3 │ 5 │ 4 │ 1 │ 0 │ 2 │▒
       └───┴───┴───┴───┴───┴───┘▒
        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Proof of 2025-08-12 WR
══════════════════════
Notation: if nth -> a, then we write [nth] = a.
To avoid ⛔「⟨⋯ a ⋯ 5 ⋯⟩, a = 0|1|2|4」, we need 5 is to the left of 0,1,2,4. It implies 5 = [5th] or [4th]:
┌───┬───┬───┬───┬───┬───┐
│5th│4th│3rd│2nd│1st│0th│
╞═══╪═══╪═══╪═══╪═══╪═══╡
│ ▬ │ ▬ │   │   │   │   │
└───┴───┴───┴───┴───┴───┘
By ✅「⟨? ⋯ 5 (?+1) ⋯ 0 ⋯⟩ (?≠4)」, 5 is not in the left corner. It follows that 5 = [4th]:
       ┌───┬───┬───┬───┬───┬───┐
       │5th│ 4■│3rd│2nd│1st│0th│▒
       ╞═══╪═══╪═══╪═══╪═══╪═══╡▒
Step 1 │   │ 5 │   │   │   │   │▒
       └───┴───┴───┴───┴───┴───┘▒
        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │ 2 │   │ 0 │ 3 │ 4 │
└───┴───┴───┴───┴───┴───┘
Since the four boxes to the right of 5 holds 0,1,2,4, we have 3 = [5th]:
       ┌───┬───┬───┬───┬───┬───┐
       │ 5■│4th│3rd│2nd│1st│0th│▒
       ╞═══╪═══╪═══╪═══╪═══╪═══╡▒
       │   │ 5 │   │   │   │   │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 2 │ 3 │ 5 │   │   │   │   │▒
       └───┴───┴───┴───┴───┴───┘▒
        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │ 2 │   │ 0 │   │ 4 │
└───┴───┴───┴───┴───┴───┘
Then, in view of ✅「⟨? ⋯ 5 (?+1) ⋯ 0 ⋯⟩ (?≠4)」 with ? = 3, we get [3rd] = 4:
       ┌───┬───┬───┬───┬───┬───┐
       │5th│4th│ 3■│2nd│1st│0th│▒
       ╞═══╪═══╪═══╪═══╪═══╪═══╡▒
       │ 3 │ 5 │   │   │   │   │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 3 │ 3 │ 5 │ 4 │   │   │   │▒
       └───┴───┴───┴───┴───┴───┘▒
        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │ 2 │   │ 0 │   │   │
└───┴───┴───┴───┴───┴───┘
We consider what [0th] is. It is not 0, otherwise we cannot avoid ⛔「⟨ ⁵ᵗʰa     ²ⁿᵈb   ⁰ᵗʰc ⟩, a > b > c」. In view of ⛔「⟦1,4⟧ ∋ 0」, it is not 1 either. Consequently, [0th] = 2:
       ┌───┬───┬───┬───┬───┬───┐
       │5th│4th│3rd│2nd│1st│ 0■│▒
       ╞═══╪═══╪═══╪═══╪═══╪═══╡▒
       │ 3 │ 5 │ 4 │   │   │   │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 4 │ 3 │ 5 │ 4 │   │   │ 2 │▒
       └───┴───┴───┴───┴───┴───┘▒
        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│ 1 │   │   │ 0 │   │   │
└───┴───┴───┴───┴───┴───┘
Finally, to avoid ⛔「⟦1,4⟧ ∋ 0」, we finish by
       ┌───┬───┬───┬───┬───┬───┐
       │5th│4th│3rd│ 2■│ 1■│0th│▒
       ╞═══╪═══╪═══╪═══╪═══╪═══╡▒
       │ 3 │ 5 │ 4 │   │   │ 2 │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 5 │ 3 │ 5 │ 4 │ 1 │   │ 2 │▒
       ├───┼───┼───┼───┼───┼───┤▒
Step 6 │ 3 │ 5 │ 4 │ 1 │ 0 │ 2 │▒
       └───┴───┴───┴───┴───┴───┘▒
        ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
--- Idle ---
┌───┬───┬───┬───┬───┬───┐
│   │   │   │   │   │   │
└───┴───┴───┴───┴───┴───┘
Q.E.D.
#125034_v2.10