ProjectEuler Problem 536: Modulo power identity - Need help understanding the question (not asking for a solution)

johnwinds

New member
Joined
May 12, 2022
Messages
1
I'm trying to solve ProjectEuler Problem 536: Modulo power identity. I'm not asking for help with the solution, I just need some help understanding the question. I think I'm missing some basic knowledge on the way these questions are defined/phrased.

I'm trying to work out what a & m stand for/mean. The question states that 1, 2, 3, 5 and 21 satisfy the property.

So if for example, a=5 and m=100:
5^(100+4) = 5 mod 100
4.930380658×10⁷² != 5

Or if a=100 and m = 5
100^(5+4) = 100 mod 5
1×10¹⁸ != 0

The question:


Let S(n) be the sum of all positive integers m not exceeding n having the following property:
[math]a^{m+4} ≡ a \pmod{m}[/math] for all integers a.

The values of m ≤ 100 that satisfy this property are 1, 2, 3, 5 and 21, thus S(100) = 1+2+3+5+21 = 32.
You are given S(106) = 22868117.

Find S(1012).
 
Also study mod arithmetic theorems.
 

Attachments

  • 1652471654032.png
    1652471654032.png
    81.7 KB · Views: 6
Last edited:
Top