cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240660 Least k such that 5^k == -1 (mod prime(n)), or 0 if no such k exists.

This page as a plain text file.
%I A240660 #4 Apr 15 2014 02:36:10
%S A240660 1,1,0,3,0,2,8,0,11,7,0,18,10,21,23,26,0,15,11,0,36,0,41,22,48,0,51,
%T A240660 53,0,56,21,0,68,0,0,0,78,27,83,86,0,0,0,96,98,0,0,111,113,57,116,0,
%U A240660 20,0,128,131,0,0,138,70,141,146,153,0,4,158,0,56,173,87
%N A240660 Least k such that 5^k == -1 (mod prime(n)), or 0 if no such k exists.
%C A240660 The least k, if it exists, such that prime(n) divides 5^k + 1.
%H A240660 T. D. Noe, <a href="/A240660/b240660.txt">Table of n, a(n) for n = 1..1000</a>
%F A240660 a(1) = 1; for n > 1, a(n) = A211241(n)/2 if A211241(n) is even, otherwise 0.
%t A240660 Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[5, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
%Y A240660 Cf. A211241 (order of 5 mod prime(n)).
%K A240660 nonn
%O A240660 1,4
%A A240660 _T. D. Noe_, Apr 14 2014