Cody

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

Solution 2026204

Submitted on 18 Nov 2019 at 9:43 by Le Duc Vu
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 = [] logkn = 0 logj = 0 logi = 1 A = 2 A = 2

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

A = [] logkn = 0 logj = 1 logi = 1 A = 2 logi = 0 A = 2 3 A = 2 3

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

A = [] logkn = 0 logj = 1 logi = 2 A = 2 A = 2 4 logi = 0 A = 2 4 3 A = 2 3 4

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

A = [] logkn = 1 logj = 1 logi = 2 A = 2 A = 2 4 logi = 0 A = 2 4 3 logj = 0 logi = 0 A = 2 4 3 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 = [] logkn = 1 logj = 2 logi = 3 A = 2 A = 2 4 A = 2 4 8 logi = 1 A = 2 4 8 3 A = 2 4 8 3 6 logi = 0 A = 2 4 8 3 6 9 logj = 0 logi = 1 A = 2 4 8 3 6 9 5 A = 2 4 8 3 6 9 5 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 = [] logkn = 1 logj = 2 logi = 4 A = 2 A = 2 4 A = 2 4 8 A = 2 4 8 16 logi = 2 A = 2 4 8 16 3 A = 2 4 8 16 3 6 A = 2 4 8 16 3 6 12 logi = 0 A = 2 4 8 16 3 6 12 9 logj = 1 logi = 1 A = 2 4 8 16 3 6 12 9 5 A = 2 4 8 16 3 6 12 9 5 10 logi = 0 A = 2 4 8 16 3 6 12 9 5 10 15 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 = [] logkn = 2 logj = 3 logi = 4 A = 2 A = 2 4 A = 2 4 8 A = 2 4 8 16 logi = 3 A = 2 4 8 16 3 A = 2 4 8 16 3 6 A = 2 4 8 16 3 6 12 A = 2 4 8 16 3 6 12 24 logi = 1 A = 2 4 8 16 3 6 12 24 9 A = 2 4 8 16 3 6 12 24 9 18 logi = 0 A = 2 4 8 16 3 6 12 24 9 18 27 logj = 1 logi = 2 A = 2 4 8 16 3 6 12 24 9 18 27 5 A = 2 4 8 16 3 6 12 24 9 18 27 5 10 A = 2 4 8 16 3 6 12 24 9 18 27 5 10 20 logi = 1 A = 2 4 8 16 3 6 12 24 9 18 27 5 10 20 15 A = 2 4 8 16 3 6 12 24 9 18 27 5 10 20 15 30 logj = 0 logi = 0 A = 2 4 8 16 3 6 12 24 9 18 27 5 10 20 15 30 25 A = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30