Palindromic Primes - MATLAB Cody - MATLAB Central

Problem 52293. Palindromic Primes

Difficulty:Rate
A Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS)
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

43.14% Correct | 56.86% Incorrect
Last Solution submitted on Oct 05, 2023

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
1
3

Problem Recent Solvers17

Suggested Problems

More from this Author31

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!