login
The duodecimal period of 1/n, or 0 if 1/n terminates.
5

%I #36 Jun 30 2019 10:15:47

%S 0,0,0,0,4,0,6,0,0,4,1,0,2,6,4,0,16,0,6,4,6,1,11,0,20,2,0,6,4,4,30,0,

%T 1,16,12,0,9,6,2,4,40,6,42,1,4,11,23,0,42,20,16,2,52,0,4,6,6,4,29,4,

%U 15,30,6,0,4,1,66,16,11,12,35,0,36,9,20,6,6,2,26,4,0,40,41,6,16,42,4,1,8,4,6,11,30,23,12,0,16,42,1,20,100,16,102,2,12,52,53,0,54,4,9,6,112

%N The duodecimal period of 1/n, or 0 if 1/n terminates.

%H Michael De Vlieger, <a href="/A246004/b246004.txt">Table of n, a(n) for n = 1..10000</a>

%e 1/10 = 0.1249724972497... has period 4 in duodecimal, so a(10) = 4.

%e 1/23 = 0.0631694842106316948421... has period 11 in duodecimal, so a(23) = 11.

%t a246004[n_Integer] :=

%t Table[Length[RealDigits[1/i, 12][[1, -1]]], {i,

%t n}]; a246004[120] (* _Michael De Vlieger_, Nov 13 2014, after _Harvey P. Dale_ at A051626 *)

%Y Cf. A007732, A051626 (decimal versions).

%Y Cf. A246489.

%K nonn,base

%O 1,5

%A _Eric Chen_, Nov 13 2014