For a positive integer x, we define the function Y, as follows:
Hence, for
we have:
And if
:
-----------------------------
We now consider the following congruence:
The congruence expresses the possibility that the nested sum and product function defined above (Y), can have a perfect power residue in some modular base. In fact, solving for x, the congruence always have a trivial solution, namely
, that's because
, which is, of course, a perfect power in any modular base.
Given the value of integers N, M, and certain limit L, find the sum S of all positive integer values of
, that satisfies the above congruence.
For
,
and
, we see that only
and
satisfies the congruence, since:
Therefore in this case S(20,7,3) = 1 + 5 = 6.
For
,
and
, the above equation is satisfied,
.
Therefore: S(20,10,3) = sum(1:20) = 210.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
Find the sum of all the numbers of the input vector
55115 Solvers
-
11297 Solvers
-
722 Solvers
-
Add a row of zeros on top of a matrix
268 Solvers
-
Element by element multiplication of two vectors
399 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I am getting all test solutions correct except: test2, test5, and test8.
For test2 for example, I am only getting [1 5] = 6.
Hi David, test suites has been corrected. Please try again. Thanks.