Recursive definition: a(1)=1, a(n) = least number m>a(n-1) such that the fractional part of (Pi-2)^m is greater than the fractional part of (Pi-2)^k for all k, 1<=k<m.
a(6)=39, since fract((Pi-2)^39)= 0.9586616565..., but fract((Pi-2)^k)<=0.9389018... for 1<=k<=38; thus fract((Pi-2)^39)>fract((Pi-2)^k) for 1<=k<39 and 39 is the minimal exponent > 5 with this property.
MATHEMATICA
$MaxExtraPrecision = 100000;
p = 0; Select[Range[1, 10000],
If[FractionalPart[(Pi - 2)^#] > p, p = FractionalPart[(Pi - 2)^#];