User Portlet User Portlet

Discussions
You do not use a for loop for this. This is a functional programing language that works best with recursive built in high level functions. Mathematica has a built in For loop but that should be used only in situations where you are teaching For loops...
I wanted to share some code I used in Mathematica that could be useful to other people who study the gaps between prime numbers or for anyone interested in proving the twin prime conjecture. a = Table[Prime[i], {i, 2, 10000000}]; b =...