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.

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

This page as a plain text file.
%I A240662 #4 Apr 15 2014 02:36:23
%S A240662 1,0,2,0,5,6,8,0,11,0,0,0,20,3,0,13,0,30,33,35,12,39,0,44,48,50,0,53,
%T A240662 0,7,63,0,34,0,37,75,26,81,0,86,89,6,5,12,49,0,105,0,0,114,58,119,120,
%U A240662 0,128,131,134,0,69,10,0,146,0,0,52,79,55,28,173,174,16
%N A240662 Least k such that 7^k == -1 (mod prime(n)), or 0 if no such k exists.
%C A240662 The least k, if it exists, such that prime(n) divides 7^k + 1.
%H A240662 T. D. Noe, <a href="/A240662/b240662.txt">Table of n, a(n) for n = 1..1000</a>
%F A240662 a(1) = 1; for n > 1, a(n) = A211243(n)/2 if A211243(n) is even, otherwise 0.
%t A240662 Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[7, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
%Y A240662 Cf. A211243 (order of 7 mod prime(n)).
%K A240662 nonn
%O A240662 1,3
%A A240662 _T. D. Noe_, Apr 14 2014