The sum of consecutive odd numbers
Haskell, 67 65 63 62 58 bytes

Saved 4 bytes thanks to Julian Wolf



f x=[[2*n+1,2*n+3..2*m]|n&lt;-[0..x],m&lt;-[n..x],m^2-n^2==x]!!0


Try it online!

I check if the number can be expressed as he difference of two squares: m^2-n^2. I can then construct the list of consecutive odd numbers: [2n+1,2n+3...2m-1]. Note that because the minimum n is chosen, the longest list will be output