0,1,1,2,3,5,8,13,21,34,55,89,144,...
The first two Fibonacci numbers are 0 and 1, and each remaining number is the sum of the previous two.
#!/bin/sh prev=0 next=1 echo $prev while(true) do echo $next #add the two numbers sum=$(($prev+$next)) #swap prev=$next next=$sum sleep 1 done