# [05AB1E], 8 bytes
    ÝDOnsnO-

Explanation:

    ÝDOnsnO-     //Full program
    Ý            //Push [0..a] where a is implicit input
     D           //Duplicate top of stack
      On         //Push sum, then square it
        s        //Swap top two elements of stack
         nO      //Square each element, then push sum
           -     //Difference (implicitly printed)

[Try it online!][TIO-jo4ngbcs]

[05AB1E]: https://github.com/Adriandmen/05AB1E
[TIO-jo4ngbcs]: https://tio.run/##yy9OTMpM/f//8FwX/7ziPH/d//8NDQA "05AB1E – Try It Online"