Problem 52293. Palindromic Primes
If given a monotonic series (increment=1) or a single number, give the corresonding palindromic prime.
Else, if given a random array of numbers, check if the numbers in the array are palindromic prime or not.
Take base 10 as the reference.
Example
input = 2:5;
output = [3 5 7 11];
input = 17;
output = 787;
input = [7 23 47 11 4 10];
output = [1 0 0 1 0 0];
Solution Stats
Problem Comments
-
2 Comments
ChrisR
on 15 Jul 2021
Dyuman, test 3 asks for four numbers, but the answer is a vector with five numbers.
Dyuman Joshi
on 15 Jul 2021
Thanks for pointing it out, Chris. The error has been rectified.
Solution Comments
Show commentsProblem Recent Solvers20
Suggested Problems
-
The Goldbach Conjecture, Part 2
2410 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
3657 Solvers
-
Back to basics 22 - Rotate a matrix
929 Solvers
-
Make a random, non-repeating vector.
11095 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
676 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!