#author("2021-11-06T13:54:18+00:00","","")
#author("2022-06-17T19:21:31+00:00","","")
*[[Problem 407:http://projecteuler.net/problem=407]] 「冪等元」 [#l9021c7d]

0 ≤ &tex{a}; ≤ 5 のときの &tex{a}; に対し &tex{a^{2}}; mod 6 を計算すると, 0,1,4,3,4,1 となる.




&tex{a^{2}}; ≡ &tex{a}; (mod 6) を満たす最大の &tex{a}; の値は 4 となる.~
&tex{a^{2}}; ≡ &tex{a}; (mod &tex{n};) を満たす &tex{a}; < &tex{n}; の最大値を M(&tex{n};) としよう.~
つまり, M(6) = 4.

1 ≤ &tex{n}; ≤ &tex{10^{7}}; のときの ΣM(&tex{n};) を求めよ.
https://www.lifesimile.com



トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS