%I
%S 3,6,9,20,56,66,133,260,513,1030,2091,4128,8593,16394,33195,65584,
%T 131345,262176,524989,1048660,2097291,4195642,8388997,16777272,
%U 33554525,67109198,134217729,268435468,536875753,1073741910
%N Smallest k>2^n such that 2^k == 2^n (mod k).
%e For n=3, 2^3=8, and k=9 works, since 2^9 = 512 == 8 (mod 9).
%t f[n_] := Block[{k = 2^n + 1}, While[ PowerMod[2, k, k] != PowerMod[2, n, k], k++]; k]; Array[f, 30] (* _Robert G. Wilson v_, Aug 01 2011 *)
%Y Cf. A015939.
%K nonn
%O 1,1
%A _Robert G. Wilson v_
%E Constraint on k added to the definition by _R. J. Mathar_, Aug 01 2011
