If you need information on de Bruijn's representation of lambda term you may want to see:
Fall 94
lecture 14
Fall 93