Variation on Angelini's A112395. The sequence cycles at a(17)=38 and the loop has 312 terms. It is exactly the same loop as in A112435 "Next term is the sum of the last 10 digits in the sequence, beginning with a(10) = 4". Computed by Gilles Sadowski.