Ulam (3m+1 Folge) in Pascal 7

Hallo Leute,

ich habe mal eine Frage:
Wie kann ich eine Ulam Folge in Borland Pascal 7 erstellen?

Ciao

Stephan