A255829 a(n) = n for n < 9; a(9n) = a(n); if every 9th term (a(9), a(18), a(27),...) is deleted, this gives back the original sequence.
1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 5, 3, 1, 2, 4, 5, 3, 1, 2, 6, 4, 5, 3, 1, 2, 6, 4, 5, 7, 3, 1, 2, 6, 4, 5, 7, 3, 8, 1, 2, 6, 4, 5, 7, 3, 8, 1, 1, 2, 6, 4, 5, 7, 3, 8, 1, 1, 1, 2, 6, 4, 5, 7, 3, 1, 8
Offset: 1
Keywords
Programs
-
PARI
a(n, m=9)=while(n>=m, if(n%m, n-=n\m, n\=m)); n \\ M. F. Hasler, Mar 07 2015
Formula
a(n) = a(n/9) if n==0 (mod 9); a(n) = a(n - floor(n/9)) otherwise.
Comments