Fibonacci

Not elegant, but effective:

#!/bin/bash
n1=0
n2=1
c=1
while [ 0==0 ]
do
  s=`echo “$n1+$n2” | bc`
  count=`echo “$c+1” | bc`
  echo -e “$c\t$s”
  n1=$n2
  n2=$s
done

Threw it together to demonstrate to Boy Wonder how to devise the sequence. Actually, this is the one I started with in pseudocode on the side of the refrigerator then it morphed into the one above to make it work in bash:
n1=0
n2=1
do
  result=n1+n2
  print result
  n1=n2
  n2=result
loop
Serves very little practical purpose other than to learn and see the relationship of numbers.