You don't usually write for loops in Erlang, as a functional language loops are better expressed as recursive functions.
Here is an example of using a recursive function in Erlang to sum up a factorial.
fac(1) ->
1;
fac(N) ->
N * fac(N - 1).