%I
%S 0,1,2,0,5,6,4,9,0,14,0,18,10,7,0,26,29,30,33,0,0,0,41,0,24,50,0,53,
%T 18,14,0,65,34,69,74,0,26,81,0,86,89,90,0,48,98,0,105,0,113,38,0,0,12,
%U 25,8,0,134,0,46,35,47,146,51,0,78,158,15,0,173,174,44,0
%N Least k such that 2^k == 1 (mod prime(n)), or 0 if no such k exists.
%C The least k, if it exists, such that prime(n) divides 2^k + 1.
%H T. D. Noe, <a href="/A240657/b240657.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = A014664(n)/2 if A014664(n) is even, otherwise 0.
%t Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[2, #, p] == p  1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
%Y Cf. A014664 (order of 2 mod prime(n)), A072936 (zero terms).
%K nonn
%O 1,3
%A _T. D. Noe_, Apr 14 2014
