login
A277545
a(n) = n/7^m mod 7, where 7^m is the greatest power of 7 that divides n.
1
1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 2, 1, 2, 3, 4, 5, 6, 3, 1, 2, 3, 4, 5, 6, 4, 1, 2, 3, 4, 5, 6, 5, 1, 2, 3, 4, 5, 6, 6, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 2, 1, 2, 3, 4, 5, 6, 3, 1, 2, 3, 4, 5, 6, 4, 1, 2, 3, 4, 5, 6, 5, 1, 2
OFFSET
1,2
COMMENTS
a(n) is the rightmost nonzero digit in the base 7 expansion of n.
LINKS
FORMULA
a(n) = A242603(n) mod 7. - Michel Marcus, Oct 20 2016
EXAMPLE
a(9) = (9/7 mod 7) = 2.
MATHEMATICA
Table[Mod[n/7^IntegerExponent[n, 7], 7], {n, 1, 160}]
PROG
(PARI) a(n) = n/7^valuation(n, 7) % 7; \\ Michel Marcus, Oct 20 2016
CROSSREFS
Sequence in context: A030998 A346691 A255827 * A190596 A338880 A053842
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 19 2016
STATUS
approved