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.

A014663 Primes p such that multiplicative order of 2 modulo p is odd.

This page as a plain text file.
%I A014663 #56 Jul 08 2025 05:41:09
%S A014663 7,23,31,47,71,73,79,89,103,127,151,167,191,199,223,233,239,263,271,
%T A014663 311,337,359,367,383,431,439,463,479,487,503,599,601,607,631,647,719,
%U A014663 727,743,751,823,839,863,881,887,911,919,937,967,983,991,1031,1039,1063
%N A014663 Primes p such that multiplicative order of 2 modulo p is odd.
%C A014663 Or, primes p which do not divide 2^n+1 for any n.
%C A014663 The possibility n=0 in the above rules out A072936(1)=2; apart from this, a(n)=A072936(n+1). - _M. F. Hasler_, Dec 08 2007
%C A014663 The order of 2 mod p is odd iff 2^k=1 mod p, where p-1=2^s*k, k odd. - _M. F. Hasler_, Dec 08 2007
%C A014663 Has density 7/24 (Hasse).
%C A014663 From _Jianing Song_, Jun 27 2025: (Start)
%C A014663 The multiplicative order of 2 modulo a(n) is A139686(n).
%C A014663 Contained in primes congruent to 1 or 7 modulo 8 (primes p such that 2 is a quadratic residue modulo p, A001132), and contains primes congruent to 7 modulo 8 (A007522). (End)
%D A014663 Christopher Adler and Jean-Paul Allouche (2022), Finite self-similar sequences, permutation cycles, and music composition, Journal of Mathematics and the Arts, 16:3, 244-261, DOI: 10.1080/17513472.2022.2116745.
%D A014663 P. Moree, Appendix to V. Pless et al., Cyclic Self-Dual Z_4 Codes, Finite Fields Applic., vol. 3 pp. 48-69, 1997.
%H A014663 T. D. Noe, <a href="/A014663/b014663.txt">Table of n, a(n) for n=1..1000</a>
%H A014663 H. H. Hasse, <a href="http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN002296616">Über die Dichte der Primzahlen p, ... </a>, Math. Ann., 168 (1966), 19-23.
%H A014663 J. C. Lagarias, <a href="http://projecteuclid.org/euclid.pjm/1102706452">The set of primes dividing the Lucas numbers has density 2/3</a>, Pacific J. Math., 118. No. 2, (1985), 449-461.
%H A014663 Chunlei Li, Nian Li, and Matthew G. Parker, <a href="http://www.ii.uib.no/~matthew/Pairs.pdf">Complementary Sequence Pairs of Types II and III</a>. [From _N. J. A. Sloane_, Jun 16 2012]
%t A014663 okQ[p_] := OddQ[MultiplicativeOrder[2, p]];
%t A014663 Select[Prime[Range[1000]], okQ] (* _Jean-François Alcover_, Nov 23 2024 *)
%o A014663 (PARI) isA014663(p)=1==Mod(1,p)<<((p-1)>>factor(p-1,2)[1,2])
%o A014663 listA014663(N=1000)=forprime(p=3,N,isA014663(p)&print1(p", ")) \\ _M. F. Hasler_, Dec 08 2007
%o A014663 (PARI) lista(nn) = {forprime(p=3, nn, if (znorder(Mod(2, p)) % 2, print1(p, ", ")););} \\ _Michel Marcus_, Feb 06 2015
%Y A014663 Cf. Complement in primes of A091317.
%Y A014663 Cf. A001132, A007522, A040098, A045315, A049564, A139686 (the actual multiplicative orders).
%Y A014663 Cf. Essentially the same as A072936 (except for missing leading term 2).
%Y A014663 Cf. other bases: this sequence (base 2), A385220 (base 3), A385221 (base 4), A385192 (base 5), A163183 (base -2), A385223 (base -3), A385224 (base -4), A385225 (base -5).
%K A014663 nonn
%O A014663 1,1
%A A014663 _N. J. A. Sloane_, Dec 11 1999
%E A014663 Edited by _M. F. Hasler_, Dec 08 2007
%E A014663 More terms from _Max Alekseyev_, Feb 06 2010