Solution: To solve this, we must count the number of 6-digit numbers using only the digits 1, 2, and 3 such that exactly one pair of consecutive digits are equal, and all other adjacent digits are different.

Solution: To solve this, we must count the number of 6-digit numbers using only the digits 1, 2, and 3 such that exactly one pair of consecutive digits are equal, and all other adjacent digits are different.

["Title: How to Count 6-Digit Numbers Using Digits 1, 2, 3 with Exactly One Equal Consecutive Pair – A Detailed Solution", "Meta Description:\nExplore the combinatorial solution to count exactly 6-digit numbers using only digits 1, 2, and 3, where exactly one pair of consecutive digits are equal, and all other adjacent pairs differ. Learn the step-by-step counting method and logic behind this challenging digit constraint.", "---", "### Introduction", "In numeral combinatorics, counting structured digit sequences under strict rules can be complex yet rewarding. A particularly interesting problem involves 6-digit numbers formed only from the digits 1, 2, and 3, where exactly one pair of consecutive digits is equal, and all other adjacent digits are different. This constraint prevents multiple repeats and avoids completely alternating or fully uniform sequences—making it a promising challenge for systematic enumeration and combinatorial reasoning.", "In this article, we break down the step-by-step solution to determine how many such valid 6-digit numbers exist, using only digits 1, 2, and 3, with exactly one equal consecutive pair.", "---", "### Problem Restatement", "We seek the count of six-digit numbers composed exclusively of the digits 1, 2, 3 such that:", "- Exactly one pair of consecutive digits is the same.\n- All other adjacent digit pairs are different (i.e., no other repeated consecutive digits).\n- The repeated digit appears once in a consecutive block, and it occurs exactly once in the entire number.", "---", "### Step 1: Understanding the Structure", "Let the number be ( d_1d_2d_3d_4d_5d_6 ), where each ( d_i \in {1,2,3} ).", "We define a "valid run" as a maximal sequence of equal adjacent digits. The rule “exactly one equal consecutive pair” means:", "- There is exactly one incident of two identical adjacent digits,\n- And no longer runs (like three or more consecutive equal digits),\n- And all other digit transitions are strictly different (( d_i <br/>\neq d_{i+1} )).", "Thus, the number’s digit pattern features one duplicated adjacent pair, and the rest switch digits each step.", "This duplicated pair causes a "hinge" in the digit sequence but only appears once.", "---", "### Step 2: General Structure", "Given exactly one repeated consecutive pair, we analyze possible block decompositions of the 6-digit number.", "Let’s define a block as a maximal run of identical digits.", "For example:\n- 112312 → Blocks: [11], [2], [3], [1], [2] → two equal adjacent pairs → invalid\n- 122312 → Blocks: [11], [2], [3], [1], [2] → one repeated pair → valid", "Therefore, valid numbers must decompose into five adjacent blocks, of which one block has length at least 2, and all others are length 1 — but wait: the single repeated pair means exactly one block has length ≥2, and all others are length 1. However, with five blocks and total length 6, this implies:", "- One block of length 2\n- Four blocks of length 1", "Because: ( 2 + 1 + 1 + 1 + 1 = 6 )", "Moreover, only one block can have length ≥2 — and it must be length exactly 2 (since any larger run creates multiple adjacent duplicates).", "Thus, the structure is:", "[\n(\ ext{block of length 2}) + (\ ext{four singleton blocks})\n]", "But note: the block of length 2 contributes one equal consecutive pair (the repeated digits), and all transitions into and out of it must involve different digits.", "---", "### Step 3: Choose Position of the Duplicate Pair", "The repeated pair (e.g., "11") occupies two adjacent positions. In a 6-digit number, how many possible placements are there for such a block of two identical digits?", "Positions for the block of two equal digits:\nPositions (1,2), (2,3), (3,4), (4,5), (5,6) → 5 possible starting positions", "But we must ensure that:", "- The repeated digit is only duplicated once (no longer run),\n- All transitions adjacent to the repeated pair differ,\n- The rest of the digits alternate properly.", "We proceed by fixing the position and value of the repeated pair.", "---", "### Step 4: Fix Block Position and Digit", "Let the repeated pair appear in one of 5 adjacent positions, with digit value ( d \in {1,2,3} ). Due to symmetry (1,2,3 are indistinct in structure), the number of valid sequences depends only on position and digit, not on which digit (so we multiply appropriately later if needed).", "Let’s denote the repeated digit as ( d ), and its block starts at position ( i ), so occupying ( d_i = d_{i+1} = d )", "Now, for each such block, we count how many valid completions exist of the remaining 4 digits satisfying the “no other equal consecutive digits” rule.", "---", "### Step 5: Analyze Valid Extensions on Either Side", "Let’s denote the full sequence:", "[\nd_1,d_2,d_3,d_4,d_5,d_6\n]", "Suppose the repeated pair is in positions ( i ) and ( i+1 ). Then:", "- At ( d_i ) and ( d_{i+1} ): same digit ( d )\n- For ( k <br/>\ne i,i+1 ), ( d_k <br/>\ne d_{k+1} )", "The remaining 4 positions (not in the duplicate block) must be filled with digits from {1,2,3}, forming a sequence where:", "- No two adjacent digits are equal,\n- Additionally, transitions at the boundaries adjacent to the repeated block must differ from ( d ).", "We handle this by considering left and right neighbors of the repeated pair.", "Let’s define:", "- Left neighbor: $ d_{i-1} $, if ( i > 1 )\n- Right neighbor: $ d_{i+2} $, if ( i < 5 )", "These neighbors must not equal ( d ).", "The remaining digits outside the pair form a sequence of 4 positions, forming a path in a digit transition graph where no two adjacent digits are equal.", "We break into cases based on the position of the repeated block, because boundary effects differ.", "---", "### Case Analysis by Position of the Duplicate Pair", "We consider each possible starting position of the block of two equal digits, and count valid completions.", "---", "#### Case 1: Pair at positions (1,2) → Block: ( d_1 = d_2 = d )", "Then:\n- ( d_3 <br/>\ne d ) (must differ)\n- Positions ( d_3,d_4,d_5,d_6 ): form a 4-digit sequence with no adjacent repeats, and ( d_3 <br/>\ne d )", "Let’s fix ( d \in {1,2,3} ). By symmetry, same count for ( d=1 ), ( d=2 ), or ( d=3 ). Compute for ( d=1 ), multiply by 3 at the end.", "So: ( d_3 \in {2,3} ) → 2 choices\nNow count sequences ( P = d_3d_4d_5d_6 ), length 4, no adjacent equal, ( d_3 <br/>\ne 1 )", "This is a classic recurrence problem.", "Let ( a_n ) = number of valid sequences of length ( n ), digits ∈ {1,2,3}, no two adjacent equal.", "We know:\n- ( a_1 = 3 )\n- ( a_n = 2 \cdot a_{n-1} ) for ( n \ge 2 ) (each position has 2 choices ≠ previous)", "Thus:\n( a_2 = 2 \cdot 3 = 6 )\n( a_3 = 2 \cdot 6 = 12 )\n( a_4 = 2 \cdot 12 = 24 )", "But we have a restriction: ( d_3 <br/>\ne 1 ), i.e., ( d_3 = 2 ) or ( 3 )", "Let’s compute number of such sequences of length 4 starting with ( d_3 \in {2,3} ), no adjacent repeats.", "Let’s split:", "Let ( S(x) ) = number of valid sequences of length 4 starting with digit ( x \in {1,2,3} ), no adjacent duplicates.", "But we fix ( d_3 = 2 ) or ( 3 ), and build forward.", "Let’s compute total sequences starting with 2, + those starting with 3, with no adjacent repeats.", "But better: use recurrence from fixed start.", "Define ( f(n, c) ): number of sequences of length ( n ), ending at digit ( c ), no adjacent repeats, starting from earlier.", "But simpler: use symmetry and recurrence.", "Let ( b_n ) = number of valid sequences of length ( n ) with no adjacent repeats.", "We have:\n( b_1 = 3 )\n( b_n = 2 \cdot b_{n-1} )", "So:\n( b_2 = 6 ), ( b_3 = 12 ), ( b_4 = 24 )", "Now, among these 24 sequences of length 4 with no adjacent repeats, how many start with 2?", "Each digit except the first has 2 choices ≠ previous.", "But first digit can be 1,2,3 with equal probability? Since recurrence is symmetric, the number starting with each digit is equal.", "Total sequences: 24\nNumber starting with 1: 8\nSimilarly, 8 starting with 2, 8 with 3", "Yes — by symmetry.", "So, number of sequences of length 4 no adjacent repeats starting with 2: 8", "Therefore, for fixed ( d=1 ), and ( d_3 = 2 ), number of completions: 8\nSimilarly for ( d_3 = 3 ): 8\nTotal for this case (pair at pos 1–2): ( 2 \ imes 8 = 16 )", "But wait: is this correct?", "Actually, no: in our recurrence, total sequences starting with 2 is 8 — yes.", "So for each choice of ( d = 1,2,3 ), and ( d_3 = 2 ) or ( 3 ), we have 8 valid continuations.", "Thus, total for Case 1: ( 3 \ imes 2 \ imes 8 = 48 )", "But wait — check overlaps or overcount? No, case is disjoint by starting position.", "✅ Valid.", "---", "#### Case 2: Pair at positions (2,3) → Block: ( d_2 = d_3 = d )", "Then:\n- ( d_1 <br/>\ne d )\n- ( d_4 <br/>\ne d )\n- ( d_1,d_2,d_3,d_4,d_5,d_6 ): positions: ( d_1 ), [d2,d3] block, ( d_4,d_5,d_6 )", "So:\n- ( d_1 \in {1,2,3} \setminus {d} ) → 2 choices\n- ( d_4 \in {1,2,3} \setminus {d} ) → 2 choices\n- Remaining positions: ( d_1, d_4, d_5, d_6 ) — but ( d_4 ) already fixed, and ( d_5,d_6 ) must satisfy no adjacent repeats and ( d_5 <br/>\ne d_4 ), ( d_6 <br/>\ne d_5 )", "So: sequence ( d_4,d_5,d_6 ), length 3, no adjacent repeats, ( d_4 <br/>\ne d )", "For fixed ( d ), number of such sequences:", "Let ( c_n ) = number of valid 3-digit sequences with no adjacent repeats, first digit ≠ fixed ( d )", "Total valid 3-digit sequences with no adjacent repeats: ( b_3 = 12 )", "From these, how many start with a digit ≠ ( d )?", "Fix first digit: can be 2 choices (≠ d). For each, number of completions: 2 × 2 = 4 (since ( a_2 = 6 ) total, but depends)", "Better: symmetry.", "Total sequences of length 3 with no adjacent repeats: 12", "Number starting with digit ≠ ( d ): since digits are symmetric, and ( d ) is one of 1,"]

Related Articles

Trending Articles