login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A255827
a(n) = n for n < 7; a(7n) = a(n); if every 7th term (a(7), a(14), a(21),...) is deleted, this gives back the original sequence.
1
1, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 5, 3, 4, 1, 2, 5, 3, 6, 4, 1, 2, 5, 3, 6, 1, 4, 1, 2, 5, 3, 6, 1, 1, 4, 1, 2, 5, 3, 1, 6, 1, 1, 4, 1, 2, 1, 5, 3, 1, 6, 1, 1, 1, 4, 1, 2, 1, 5, 3, 1, 1, 6, 1, 1, 1, 4, 1, 1, 2, 1, 5, 3, 1, 2, 1, 6
OFFSET
1,2
COMMENTS
A self-generating sequence. This is the m=7 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/7) if n==0 (mod 7); a(n) = a(n - floor(n/7)) otherwise.
PROG
(PARI) a(n, m=7)=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