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.

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

This page as a plain text file.
%I A240657 #5 Apr 15 2014 02:35:43
%S A240657 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 A240657 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 A240657 25,8,0,134,0,46,35,47,146,51,0,78,158,15,0,173,174,44,0
%N A240657 Least k such that 2^k == -1 (mod prime(n)), or 0 if no such k exists.
%C A240657 The least k, if it exists, such that prime(n) divides 2^k + 1.
%H A240657 T. D. Noe, <a href="/A240657/b240657.txt">Table of n, a(n) for n = 1..1000</a>
%F A240657 a(n) = A014664(n)/2 if A014664(n) is even, otherwise 0.
%t A240657 Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[2, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
%Y A240657 Cf. A014664 (order of 2 mod prime(n)), A072936 (zero terms).
%K A240657 nonn
%O A240657 1,3
%A A240657 _T. D. Noe_, Apr 14 2014