#!/usr/bin/perl -l use bigint;for ( <> ) { chomp; print $_, " => ", $_ * ($_ * ($_ + 6) + 11) / 6 + 1 }
3 25252 100000
3 => 20 25252 => 2684350843635 100000 => 166676666850001
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!