Skip to main content
2 of 3
deleted 53 characters in body
sergiol
  • 3.5k
  • 1
  • 15
  • 31

Tcl, 80 bytes

proc S l\ u {while \$l<=$u {incr Q $l
incr R [expr $l**2]
incr l}
expr $Q**2-$R}

Try it online!

sergiol
  • 3.5k
  • 1
  • 15
  • 31