login
A277544
a(n) = n/6^m mod 6, where 6^m is the greatest power of 6 that divides n.
6
1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 3, 1, 2, 3, 4, 5, 4, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 3, 1, 2, 3, 4, 5, 4, 1, 2, 3, 4, 5, 5, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 2, 1, 2
OFFSET
1,2
COMMENTS
a(n) is the rightmost nonzero digit in the base 6 expansion of n.
LINKS
FORMULA
a(n) = A244414(n) mod 6. - Michel Marcus, Oct 20 2016
EXAMPLE
a(8) = (8/6 mod 6) = 2.
MATHEMATICA
Table[Mod[n/6^IntegerExponent[n, 6], 6], {n, 1, 160}]
PROG
(PARI) a(n) = n/6^valuation(n, 6) % 6; \\ Michel Marcus, Oct 20 2016
CROSSREFS
Sequence in context: A117724 A255826 A339256 * A190595 A338863 A280502
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 19 2016
STATUS
approved