login
A255828
a(n) = n for n < 8; a(8n) = a(n); if every 8th term (a(8), a(16), a(24),...) is deleted, this gives back the original sequence.
2
1, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 4, 1, 3, 2, 4, 1, 3, 2, 5, 4, 1, 3, 2, 5, 4, 1, 6, 3, 2, 5, 4, 1, 6, 3, 7, 2, 5, 4, 1, 6, 3, 7, 1, 2, 5, 4, 1, 6, 3, 7, 1, 1, 2, 5, 4, 1, 6, 3, 1, 7, 1, 1, 2, 5, 4, 1, 1, 6, 3, 1, 7, 1, 1, 2, 1, 5, 4, 1, 1
OFFSET
1,2
COMMENTS
A self-generating sequence. This is the m=8 analog of the m=10 variant A126616. Sequence A117943 is the m=3 analog with all terms decreased by 1.
FORMULA
a(n) = a(n/8) if n==0 (mod 8); a(n) = a(n - floor(n/8)) otherwise.
PROG
(PARI) a(n, m=8)=while(n>=m, if(n%m, n-=n\m, n\=m)); n \\ M. F. Hasler, Mar 07 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Mar 07 2015
STATUS
approved