cQuents, 21 bytes
_+(Tr$)%1)=Tr_+$)%1)) Port of the jelly answer.
Explanation
r$) r_+$) # Root (defaults to square root) %1 %1 # Modulo 1 (only taking the decimal part) T ) T ) # Ceiling (round up if there is a decimal part) ( = ) # Equal (same as jelly answer) _+ # Successor (same as jelly answer) List output, 15 bytes
1,D2)*_-(k*2),1 Playing with the output a bit, we can golf off 6 bytes.
Instead of outputting 1,2,2,2,1, it outputs 1,[2,2,2],1.
Explanation
1, # A one D2) # Digits of 2 (which is of course, just 2) *_-(k*2) # Multiplied by k*2-1 (it's multiplying a list) ,1 # Another one