Yeah, that would work, throw it before the
Where clause and change 49.
Range here doesn't specify a stopping point, but a count of generated values (this makes it not quite the same as Python's
range). So you'd want:
Enumerable.Range(0,13).Select(x => 4 * x + 1).Where((e, i) => i % 3 == 0).Skip(2)
And that's equivalent to the original, short of writing a
MyRange that combines the first
Range and
Select. Still an awful lot of work for generating 3 numbers.