login
Period of last digit of multiples of n.
0

%I #23 Jun 18 2019 10:53:31

%S 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,

%T 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,

%U 10,5,10,1,10,5,10,5,2,5,10,5,10,1,10,5,10,5,2,5,10

%N Period of last digit of multiples of n.

%C The list is periodic, with period 10.

%e 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.

%t Array[10/GCD[#, 10] &, 77] (* _Michael De Vlieger_, Dec 23 2017 *)

%o (PARI) a(n) = 10/gcd(n, 10) \\ _Iain Fox_, Dec 11 2017

%Y Cf. A054531.

%K base,nonn

%O 0,2

%A _Leonardo Sznajder_, Dec 11 2017

%E More terms from _Michael De Vlieger_, Dec 23 2017.

%E Term a(0) = 1 prepended by _Halfdan Skjerning_, Jun 18 2019