2

To elaborate, I'd like to programmatically find numbers which can only be divisible by primes and themselves. I'd like to ensure primes are excluded from the output.

$n$ would be the input. A few examples to clarify;

$n=1$ returns 4, $n=2$ returns 6, $n=3$ returns 9, $n=4$ returns 10, $n=5$ returns 14, etc.

Help would be greatly appreciated!

EDIT: Turns out to be sequence A001358 in OEIS, thanks Raymond

0 Answers0