Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #4 Apr 15 2014 02:36:03
%S 0,0,1,0,0,3,2,0,0,7,0,9,5,0,0,13,0,15,0,0,0,0,0,0,12,25,0,0,9,7,0,0,
%T 17,0,37,0,13,0,0,43,0,45,0,24,49,0,0,0,0,19,0,0,6,0,4,0,67,0,23,0,0,
%U 73,0,0,39,79,0,0,0,87,22,0,0,93,0,0,97,11,50,51
%N Least k such that 4^k == -1 (mod prime(n)), or 0 if no such k exists.
%C The least k, if it exists, such that prime(n) divides 4^k + 1.
%H T. D. Noe, <a href="/A240659/b240659.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = A082654(n)/2 if A082654(n) is even, otherwise 0.
%t Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[4, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
%Y Cf. A082654 (order of 4 mod prime(n)).
%K nonn
%O 1,6
%A _T. D. Noe_, Apr 14 2014