Cody

# Problem 365. Numbers with prime factors 2, 3 and 5.

Solution 2030433

Submitted on 21 Nov 2019 by Hung Trinh
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 = 2; A_correct = 2; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 b = 1 b = 2 h = 2 A = 2

2   Pass
n = 3; A_correct = [2 3]; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 a = 1 2 3 b = 1 b = 2 h = 2 b = 3 h = 2 3 A = 2 3

3   Pass
n = 4; A_correct = [2 3 4]; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 a = 1 2 3 a = 1 2 3 4 b = 1 b = 2 h = 2 b = 3 h = 2 3 b = 2 2 h = 2 3 4 A = 2 3 4

4   Pass
n = 5; A_correct = [2 3 4 5]; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 a = 1 2 3 a = 1 2 3 4 a = 1 2 3 4 5 b = 1 b = 2 h = 2 b = 3 h = 2 3 b = 2 2 h = 2 3 4 b = 5 h = 2 3 4 5 A = 2 3 4 5

5   Pass
n = 10; A_correct = [2 3 4 5 6 8 9 10]; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 a = 1 2 3 a = 1 2 3 4 a = 1 2 3 4 5 a = 1 2 3 4 5 6 a = 1 2 3 4 5 6 7 a = 1 2 3 4 5 6 7 8 a = 1 2 3 4 5 6 7 8 9 a = 1 2 3 4 5 6 7 8 9 10 b = 1 b = 2 h = 2 b = 3 h = 2 3 b = 2 2 h = 2 3 4 b = 5 h = 2 3 4 5 b = 2 3 h = 2 3 4 5 6 b = 7 b = 2 2 2 h = 2 3 4 5 6 8 b = 3 3 h = 2 3 4 5 6 8 9 b = 2 5 h = 2 3 4 5 6 8 9 10 A = 2 3 4 5 6 8 9 10

6   Pass
n = 17; A_correct = [2 3 4 5 6 8 9 10 12 15 16]; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 a = 1 2 3 a = 1 2 3 4 a = 1 2 3 4 5 a = 1 2 3 4 5 6 a = 1 2 3 4 5 6 7 a = 1 2 3 4 5 6 7 8 a = 1 2 3 4 5 6 7 8 9 a = 1 2 3 4 5 6 7 8 9 10 a = 1 2 3 4 5 6 7 8 9 10 11 a = 1 2 3 4 5 6 7 8 9 10 11 12 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 b = 1 b = 2 h = 2 b = 3 h = 2 3 b = 2 2 h = 2 3 4 b = 5 h = 2 3 4 5 b = 2 3 h = 2 3 4 5 6 b = 7 b = 2 2 2 h = 2 3 4 5 6 8 b = 3 3 h = 2 3 4 5 6 8 9 b = 2 5 h = 2 3 4 5 6 8 9 10 b = 11 b = 2 2 3 h = 2 3 4 5 6 8 9 10 12 b = 13 b = 2 7 b = 3 5 h = 2 3 4 5 6 8 9 10 12 15 b = 2 2 2 2 h = 2 3 4 5 6 8 9 10 12 15 16 b = 17 A = 2 3 4 5 6 8 9 10 12 15 16

7   Pass
n = 31; A_correct = [2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30]; assert(isequal(your_fcn_name(n),A_correct))

a = [] h = [] a = 1 a = 1 2 a = 1 2 3 a = 1 2 3 4 a = 1 2 3 4 5 a = 1 2 3 4 5 6 a = 1 2 3 4 5 6 7 a = 1 2 3 4 5 6 7 8 a = 1 2 3 4 5 6 7 8 9 a = 1 2 3 4 5 6 7 8 9 10 a = 1 2 3 4 5 6 7 8 9 10 11 a = 1 2 3 4 5 6 7 8 9 10 11 12 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 a = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 a = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Column 31 31 b = 1 b = 2 h = 2 b = 3 h = 2 3 b = 2 2 h = 2 3 4 b = 5 h = 2 3 4 5 b = 2 3 h = 2 3 4 5 6 b = 7 b = 2 2 2 h = 2 3 4 5 6 8 b = 3 3 h = 2 3 4 5 6 8 9 b = 2 5 h = 2 3 4 5 6 8 9 10 b = 11 b = 2 2 3 h = 2 3 4 5 6 8 9 10 12 b = 13 b = 2 7 b = 3 5 h = 2 3 4 5 6 8 9 10 12 15 b = 2 2 2 2 h = 2 3 4 5 6 8 9 10 12 15 16 b = 17 b = 2 3 3 h = 2 3 4 5 6 8 9 10 12 15 16 18 b = 19 b = 2 2 5 h = 2 3 4 5 6 8 9 10 12 15 16 18 20 b = 3 7 b = 2 11 b = 23 b = 2 2 2 3 h = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 b = 5 5 h = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 b = 2 13 b = 3 3 3 h = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 b = 2 2 7 b = 29 b = 2 3 5 h = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30 b = 31 A = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30