Skip to main content
1 of 3

Java 8, 78 57 bytes

i->{int j=0,l=0;for(;j<=i;l+=j*j++);System.out.print(l);}