fork download
  1. #!/usr/bin/perl -l
  2.  
  3. use bigint;
  4. for ( <> ) { chomp; print $_, " => ", $_ * ($_ * ($_ + 6) + 11) / 6 + 1 }
Success #stdin #stdout 0.05s 11696KB
stdin
3
25252
100000
stdout
3 => 20
25252 => 2684350843635
100000 => 166676666850001