I've faced a question in my homework, I was able to solve it but not as desired.
Question: Given the language $L=\{0^n1^{n+1}\ |\ \exists k\in \mathbb{N} :\ 4n+2=6k \}$, Prove that it's a CFL (Note: it can be solved without using CFG or PDA).
My Answer: I provided the CFG: $$S\rightarrow 0T11\\T\rightarrow 000T111\ |\ \varepsilon$$
Explanation: The reason I did this that as I see the language consists of the words $(011,000011111,000000011111111,\dots)$ meaning that $(\#_0\ mod\ 3=1 \ and\ \#_1=\#_0+1)$.
I think my solution is true but still, I'm curious how can I solve it without using CFG or CFL, I tend to think that it can be done by using closure properties of CFLs along with pre-learned CFLs.
Note: I've learned that the below language is CFL: $$\{0^n1^n\ :\ n\in \mathbb{N} \}$$ I don't know if it really helps.
If anyone can provide a solution even though using CFLs that he isn't sure I learned or not, I'll be thankful.