A277543 a(n) = n/5^m mod 5, where 5^m is the greatest power of 5 that divides n.
1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1, 2, 3, 4, 3, 1, 2, 3, 4, 4, 1, 2, 3, 4, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1, 2, 3, 4, 3, 1, 2, 3, 4, 4, 1, 2, 3, 4, 2, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1, 2, 3, 4, 3, 1, 2, 3, 4, 4, 1, 2, 3, 4, 3, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1
Offset: 1
Examples
a(20) = (20/5 mod 5) = 4.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Table[Mod[n/5^IntegerExponent[n, 5], 5], {n, 1, 160}]
-
PARI
a(n) = n/5^valuation(n, 5) % 5; \\ Michel Marcus, Oct 20 2016
Comments