Problem 60401. Find primes and integers that solve an equation
Write a function to find all primes p and non-negative integers k that solve the equation
where a is an integer. If there are no solutions for a given value of a, return p = [] and k = [].
Solution Stats
Problem Comments
-
1 Comment
ChrisR
on 25 May 2024
This problem is like CP 60331 in that there's an elegant solution that uses a bit of math, but the brute force solutions works just fine. Both are inspired by YouTube videos.
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
-
1024 Solvers
-
Determine Whether an array is empty
781 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
483 Solvers
-
Replace all zeros and NaNs in a matrix with the string 'error'
100 Solvers
-
233 Solvers
More from this Author291
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!