|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is the rightmost nonzero digit in the base 7 expansion of n.
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|