1,2

A self-generating sequence. This is the m=9 analog of the m=10 variant A126616. Sequence A117943 is the m=3 analog with all terms decreased by 1.

Table of n, a(n) for n=1..100.

a(n) = a(n/9) if n==0 (mod 9); a(n) = a(n - floor(n/9)) otherwise.

(PARI) a(n, m=9)=while(n>=m, if(n%m, n-=n\m, n\=m)); n \\ M. F. Hasler, Mar 07 2015

Cf. A117943, A255824 - A255828, A126616.

Sequence in context: A031076 A321999 A228822 * A277547 A190598 A053844

Adjacent sequences: A255826 A255827 A255828 * A255830 A255831 A255832

nonn

M. F. Hasler, Mar 07 2015

approved