A296420 Period of last digit of multiples of n.
1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10, 5, 10, 1, 10, 5, 10, 5, 2, 5, 10
Offset: 0
Examples
a(6)=5 because multiples of 6 are 6, 12, 18, 24, 30, 36, 42 and the last digits of those numbers are 6,2,8,4,0,6,2,... with a period of 5.
Crossrefs
Cf. A054531.
Programs
-
Mathematica
Array[10/GCD[#, 10] &, 77] (* Michael De Vlieger, Dec 23 2017 *)
-
PARI
a(n) = 10/gcd(n, 10) \\ Iain Fox, Dec 11 2017
Extensions
More terms from Michael De Vlieger, Dec 23 2017.
Term a(0) = 1 prepended by Halfdan Skjerning, Jun 18 2019
Comments