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.

A014662 Primes p such that order of 2 mod p (=A007733(p)) is even.

This page as a plain text file.
%I A014662 #47 Jul 08 2025 05:41:04
%S A014662 3,5,11,13,17,19,29,37,41,43,53,59,61,67,83,97,101,107,109,113,131,
%T A014662 137,139,149,157,163,173,179,181,193,197,211,227,229,241,251,257,269,
%U A014662 277,281,283,293,307,313,317,331,347,349,353,373,379,389,397,401,409,419
%N A014662 Primes p such that order of 2 mod p (=A007733(p)) is even.
%C A014662 Apart from the first term, identical to A091317. - _Charles R Greathouse IV_, Feb 13 2009
%C A014662 Dirichlet density is 5/24 (Fein, Gordon, & Smith); they show a result on expressing -1 as the sum of two squares relating to this sequence. - _Charles R Greathouse IV_, May 15 2024
%D A014662 P. Moree, Appendix to V. Pless et al., Cyclic Self-Dual Z_4 Codes, Finite Fields Applic., vol. 3 pp. 48-69, 1997.
%H A014662 Klaus Brockhaus, <a href="/A014662/b014662.txt">Table of n, a(n) for n = 1..1000</a>
%H A014662 Burton Fein, Basil Gordon, and John H. Smith, <a href="https://doi.org/10.1016/0022-314X(71)90005-9">On the representation of -1 as a sum of two squares in an algebraic number field</a> J. Num. Theor. (1971) Vol. 3, Issue 3, 310-315.
%H A014662 Eugen J. Ionascu, Florian Luca, and Thomas Merino, <a href="https://arxiv.org/abs/2412.10839">On the average value of the minimal Hamming multiple</a>, arXiv:2412.10839 [math.NT], 2024. See pp. 4, 17.
%H A014662 C. Smyth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Smyth/smyth2.html">The terms in Lucas Sequences divisible by their indices</a>, JIS 13 (2010) #10.2.4.
%p A014662 select(t -> isprime(t) and numtheory:-order(2,t)::even, [2*i+1 $ i=1..1000]); # _Robert Israel_, Aug 12 2014
%t A014662 Select[Prime[Range[80]], EvenQ[MultiplicativeOrder[2, #/(2^IntegerExponent[ #, 2])]]&] (* _Jean-François Alcover_, Sep 02 2018 *)
%o A014662 (Magma) [ p: p in PrimesInInterval(3, 419) | IsEven(Modorder(2, p)) ]; // _Klaus Brockhaus_, Dec 09 2008
%o A014662 (PARI) isok(p) = isprime(p) && !(znorder(Mod(2, p/2^valuation(p, 2))) % 2); \\ _Michel Marcus_, Sep 02 2018
%o A014662 (PARI) is(n)=n>2 && Mod(2,n)^(n>>valuation(n-1,2))!=1 && isprime(n) \\ _Charles R Greathouse IV_, May 07 2024
%Y A014662 The prime terms of A296243.
%Y A014662 Cf. A091317.
%K A014662 nonn
%O A014662 1,1
%A A014662 _N. J. A. Sloane_
%E A014662 More terms from _Klaus Brockhaus_, Dec 09 2008