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.

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

This page as a plain text file.
%I A240658 #4 Apr 15 2014 02:35:56
%S A240658 1,0,2,3,0,0,8,9,0,14,15,9,4,21,0,26,0,5,11,0,6,39,0,44,24,50,17,0,0,
%T A240658 56,63,0,68,69,74,25,39,81,0,86,0,0,0,8,98,99,105,111,0,0,116,0,60,0,
%U A240658 128,0,134,15,0,140,141,146,17,0,0,158,165,84,0,87,176,0
%N A240658 Least k such that 3^k == -1 (mod prime(n)), or 0 if no such k exists.
%C A240658 The least k, if it exists, such that prime(n) divides 3^k + 1.
%H A240658 T. D. Noe, <a href="/A240658/b240658.txt">Table of n, a(n) for n = 1..1000</a>
%F A240658 a(1) = 1; for n > 1, a(n) = A062117(n)/2 if A062117(n) is even, otherwise 0.
%t A240658 Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[3, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
%Y A240658 Cf. A062117 (order of 3 mod prime(n)).
%K A240658 nonn
%O A240658 1,3
%A A240658 _T. D. Noe_, Apr 14 2014