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).
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:
#536 Modulo Power Identity - Project Euler
A website dedicated to the fascinating world of mathematics and programming
projecteuler.net
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).