OFFSET
0,6
COMMENTS
It is assumed that trace(n*tau) is purely periodic, as conjectured at A228487 where trace is defined.
EXAMPLE
a(6) = 4 because the trace(6*tau) = 1001 (repeated) has period 4.
n trace(n*tau)
- ------------
1 000000000...
2 111111111...
3 000000000...
4 000000000...
5 000000000...
6 1001 (repeated)
7 000000000...
8 111111111...
9 10 (repeated)
10 0100 (repeated)
14 110011 (repeated)
17 10 (repeated)
20 0101010010 (repeated)
30 101000111111001010 (repeated)
31 000000000...
35 1100101010011 (repeated)
MATHEMATICA
$MaxExtraPrecision = Infinity; period[seq_] := (If[Last[#1] == {} || Length[#1] == Length[seq] - 1, 0, Length[#1]] &)[NestWhileList[Rest, Rest[seq], #1 != Take[seq, Length[#1]] &, 1]]; periodicityReport[seq_] := ({Take[seq, Length[seq] - Length[#1]], period[#1], Take[#1, period[#1]]} &)[Take[seq, -Length[NestWhile[Rest[#1] &, seq, period[#1] == 0 &, 1, Length[seq]]]]]
(*output format {initial segment, period length, period}*)
t[{x_, y_, _}] := t[{x, y}]; t[{x_, y_}] := Prepend[If[# > y - #, {y - #, 1}, {#, 0}], y] &[Mod[x, y]]; userIn2[{x_, y_}] := Most[NestWhileList[t, {x, y}, (#[[2]] > 0) &]];
z = 160; pr = Table[p = Convergents[n*GoldenRatio, z]; pairs = Table[{Numerator[#], Denominator[#]} &[p[[k]]], {k, 1, z}]; periodicityReport[Most[Last[Map[Map[#[[3]] &, Rest[userIn2[#]]] &, pairs]]]], {n, 200}]
m = Map[#[[2]] &, pr] (* Peter J. C. Moses, Aug 22 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Aug 23 2013
STATUS
approved