Only trick is knowing gmp

library(gmp)
t <- as.bigz(1:100)

answer <- sum(t)^2 - sum(t^2)