<?php

$total = 30;
$skip = 5;
$winnersCount = 4;
$start = 0;

$list = range(1, $total);
while (count($list) > $winnersCount) {
	$index = ($start + $skip) % count($list) - 1;
	array_splice($list, $index, 1);
	$start = $index === -1 ? 0 : $index;
}

var_dump(join(', ', $list));