Find the modulo of sum of square of first n primes with 24.
Example:
For n = 1, mod(2^2,24) = 4
For n = 2, mod(2^2 + 3^2,24) = 13
For n = 4, mod(2^2 + 3^2 + 5^2 + 7^2,24) = 15
Note: n can be very large.
Hint : refer tag or check the modulo of square of primes(greater than 3) with 24 to observe the pattern
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers19
Suggested Problems
-
559 Solvers
-
Reverse the elements of an array
1111 Solvers
-
723 Solvers
-
Matrix of almost all zeros, except for main diagonal
191 Solvers
-
192 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!