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”).

A272181
a(1) = 1; a(n) = n mod a(k), k being the largest value such that n mod a(k) > 1, or n if there is no such k.
1
1, 2, 3, 2, 2, 6, 7, 2, 2, 3, 2, 5, 3, 2, 3, 2, 2, 3, 4, 2, 3, 2, 2, 4, 4, 2, 3, 3, 2, 2, 3, 2, 3, 2, 2, 36, 2, 2, 3, 4, 2, 2, 3, 2, 9, 2, 2, 3, 4, 2, 3, 7, 4, 2, 3, 2, 3, 2, 2, 4, 5, 2, 3, 4, 2, 2, 3, 2, 4, 2, 3, 2, 3, 2
OFFSET
1,2
LINKS
EXAMPLE
a(5) = 2; k = 3 and 5 mod a(3) = 2.
CROSSREFS
Sequence in context: A119809 A007653 A353623 * A154179 A300862 A151863
KEYWORD
nonn
AUTHOR
Cody M. Haderlie, Apr 21 2016
STATUS
approved