(*  An Instance of Godel Numbering: S^* ---> N  *)

(*  For example, S={1,2,3,4,5,6}.  *)

s=6; F[alpha_]:=Sum[alpha[[j]]*s^(Length[alpha]-j),{j,1,Length[alpha]}];

alpha={3,3,4,2,3,6,5,5,1,3};  (* ¬¬⟶)¬|pp(¬  *)

F[alpha]

G[xi_]:=
{Quotient[xi[[1]],s]-KroneckerDelta[Mod[xi[[1]],s],0],
Mod[xi[[1]],s]+KroneckerDelta[Mod[xi[[1]],s],0]*s};

x=36517365; 
gamma={};in={x,0}; 
While[0<in[[1]],{out=G[in], gamma=Prepend[gamma,out[[2]]],in=out}];

gamma