Curious as to if there’s a way to construct a sequence with a specific pattern of $j$ odd numbers followed by $k$ even numbers.
For example, if $j=1$ and $k=1$, then the sequence would be:
odd, even, odd, even, …
A little more complex: if $j=2$ and $k=3$, then the sequence would be:
odd, odd, even, even, even, odd, odd, even, even, even …
So far, I have only been able to come up with sequences that don’t use $j$ or $k$, since I do not know how to even begin writing a general formula.
Example: to return a repeated sequence of 1 odd followed by 1 even, I used $n$, as that returns:
1, 2, 3, 4, 5, …
Another example: if for some reason you wanted 2 odd followed by 2 even, you would use $\frac{n(n+1)}{2}$, as that returns:
1, 3, 6, 10, 15, 21, …
The only other one I can find is $\frac{n(n+1)(n+2)}{6}$, which gives you 1 odd, 3 evens, etc. I also noticed that both the second and third expressions could be written with rising factorials in the numerator and factorials in the denominator, so maybe that connects somehow?
If possible I’d like to avoid floor, mod, or any other piecewise/step functions? Numbers can be used more than once, and they don’t have to be increasing (it would be better the smaller they are, but not necessary).
I’ve been working on this for a while to no avail, so if anybody has ideas (or solutions) that would be incredible. Sorry if this is a bit verbose, but thanks a ton.