0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

OMC229B(994,整数)

0
Last updated at Posted at 2024-09-17

まず、ある$8$桁の数を$A=a_7a_6a_5a_4a_3a_2a_1a_0$と表します。
$1$桁ずつに分解すると合同式は、
 $10^0×a_0≡a_0$
 $10^1×a_1=(11-1)×a_1≡-a_1$
 $10^2×a_2=(11×9+1)×a_2≡a_2$
 $10^3×a_3=(11×91-1)×a_3≡-a_3$
 $10^4×a_4=(11×909+1)×a_4≡a_4$
 $10^5×a_5=(11×9091-1)×a_5≡-a_5$
 $10^6×a_6=(11×90909+1)×a_6≡a_6$
 $10^7×a_7=(11×909091-1)×a_7≡-a_7$
になります。
なので、
 $A≡-a_7+a_6-a_5+a_4-a_3+a_2-a_1+a_0$ $…①$
と表せます。

次に$A$の順番を入れ替えた$A'=a_0a_1a_2a_3a_4a_5a_6a_7$についても$①$と同様に合同式を作ると、
 $A'≡-a_0+a_1-a_2+a_3-a_4+a_5-a_6+a_7$ $…②$
になります。
$①,②$より、
 $A+A'≡0$
です。
$A≡0$の場合、$A+A'=0$ですが、$A≢0$の場合、$A+A'=11$です。
(上の式の$=$は正確には"イコール"ではなく、余りの和です。)

$A≡0$になる条件は、$①$と$a_0+a_1+a_2+a_3+a_4+a_5+a_6+a_7=36$から、$a_0+a_2+a_4+a_6=a_1+a_3+a_5+a_7=18$とわかります。
$1~8$の数から$4$つを選んで、和が$18$になる組み合わせは、
 $(1,2,7,8),(1,3,6,8),(1,4,5,8),(1,4,6,7),(2,3,5,8),(2,3,6,7),(2,4,5,7),(3,4,5,6)$
の$8$通りです。 $…③$

$(a_0,a_2,a_4,a_6)$の並べ方は$4!$通りあり、$(a_1,a_3,a_5,a_7)$の並べ方も$4!$通りあります。 $…④$
$③,④$より、$A≡0$になる組み合わせは$8×(4!)^2$通りです。 $…⑤$

すべての組み合わせ$8!$通りと$⑤$より、$A≢0$になる組み合わせは$8!-8×(4!)^2$通りです。 $…⑥$

$(A,A')$と$(A',A)$は同じなので、$(A,A')$の組み合わせは$⑥$の半分$\frac{8!-8×(4!)^2}{2}$通りになり、
また、$A+A'≡11$より、解($1〜8$を並べ替えてできる$8$桁の数を$11$で割った余りの総和)は、
 $11×\frac{8!-8×4!×4!}{2}=196416$
です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?