Try this:
for (int i = 1; i <= 14; i++)
Console.WriteLine(i - i / 6 - i / 7 - i / 9 + i / 12 - i / 13 + i / 14);
At position i = 6
, i = 7
, i = 9
and i = 13
you want to repeat the previous value, so subtract i / _
, but need to add i / 12
and i / 14
because from 12
and 14
subtractions i / 6
and i / 7
start counting twice.
solved Loop without IF or SWITCH condition within it