Cody

Problem 46701. Compute the nth Naerogahtyp emirp

Solution 3335003

Submitted on 22 Oct 2020 by Tim
  • Size: 93
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
n = 1; ne_correct = 1061; assert(isequal(NaerogahtypEmirp(n),ne_correct))

2   Pass
n = 2; ne_correct = 1069; assert(isequal(NaerogahtypEmirp(n),ne_correct))

3   Pass
n = 5; ne_correct = 15053; assert(isequal(NaerogahtypEmirp(n),ne_correct))

4   Pass
n = 10; ne_correct = 102769; assert(isequal(NaerogahtypEmirp(n),ne_correct))

5   Pass
n = 29; ne_correct = 1508621; assert(isequal(NaerogahtypEmirp(n),ne_correct))

6   Pass
n = 53; ne_correct = 11364701; assert(isequal(NaerogahtypEmirp(n),ne_correct))

7   Pass
n = 101; ne_correct = 106684421; assert(isequal(NaerogahtypEmirp(n),ne_correct))

8   Pass
n = 197; ne_correct = 153918421; assert(isequal(NaerogahtypEmirp(n),ne_correct))

9   Pass
n = [17 31 67]; for k = 1:3 ne(k) = NaerogahtypEmirp(n(k)); end sum_correct = 102944443; assert(isequal(sum(ne),sum_correct))

Suggested Problems

More from this Author50

Community Treasure Hunt

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

Start Hunting!