Problem statement
For a given positive integer n, provide the prime couples (p,p') such that p + p' = 10^n.
NB : a number like 5 which is its own complementary to 10 is accepted as a couple : (5,5), but no duplicata should be in the list.
Examples (check the test suite for more)
  • n = 1 => p = [3, 7; 5, 5];
  • n = 2 => p = [3, 97; 11, 89; 17, 83; 29, 71; 41, 59; 47, 53];
Forbidden functions / expressions
  • regexp
  • assignin
  • str2num
  • echo
See also

Solution Stats

42 Solutions

32 Solvers

Last Solution submitted on Feb 06, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers32

Suggested Problems

More from this Author42

Community Treasure Hunt

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

Start Hunting!