var sourceList = [11, 14, 15, 17, 27, 28, 32, 52, 53, 54, 55, 56, 57, 75, 90, 97];
sourceList.sort();
var max_d = 9, K = 4;
var result = [];
var sequence = [sourceList[0] - max_d];
sourceList.forEach(num => {
if(num - sequence[sequence.length - 1] >= max_d) {
if(sequence.length >= K) result = sequence;
sequence = [];
}
sequence.push(num);
});
if(sequence.length >= K) result = sequence;
console.log(result);