Write a function that takes a number n as input and finds the first set of n primes such that the first and last have the same digit sum. For example, if the function is given n = 5, it should return [2 11] because those numbers begin and end the string of 5 primes—2, 3, 5, 7, 11.

Solution Stats

19 Solutions

15 Solvers

Last Solution submitted on May 25, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers15

Suggested Problems

More from this Author323

Problem Tags

Community Treasure Hunt

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

Start Hunting!