The best distro to use on enviorment headless and only run scripts

Hello,

I pretend create a machine headless for only run scripts! I think use Ubuntu Server, but this is the best option? Exist another system more light? Because the purpose is run script which do mathematical calculations. Sum, Division and Modules!

My knowledge about word gnu/linux is on Lubuntu and Ubuntu! Therefore only system debian!

Notice: I pretend access on this machine through my laptop via ssh, in port RJ-45. For this I think will set IPtables, because I pretend limited the access via this environment!