1, 2, 3, 4, 5, 6, 8, 9, 10, 12, …. The number 1 is included.
Given k, return the k-th number in this list (counting from 1).k=7 → 8
The sequence starts 1, 2, 3, 4, 5, 6, 8. The seventh number is 8 (7 is skipped because 7 is a prime factor).
k=12 → 16
Next come 9, 10, 12, 15, 16, so the twelfth is 16. 11, 13 and 14 are skipped.
k=1 → 1
1 has no prime factors at all, so it opens the list.
k=7
8
Run checks the first 3 tests in your browser. Submit checks all 41 tests on the server, hidden ones included.