nucleotide solved with recursive loop