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.

A070184 Primes p such that x^8 = 2 has a solution mod p, but x^(8^2) = 2 has no solution mod p.

This page as a plain text file.
%I A070184 #28 Jun 23 2024 11:26:35
%S A070184 257,1217,1249,1553,1777,2113,2657,2833,4049,4273,4481,4993,5297,6449,
%T A070184 6481,6689,7121,7489,8081,8609,9137,9281,9649,10177,10337,10369,10433,
%U A070184 11329,11617,11633,12241,12577,13121,13441,13633,14321,14753,15073,15121,15569,16417,16433,16673,17137
%N A070184 Primes p such that x^8 = 2 has a solution mod p, but x^(8^2) = 2 has no solution mod p.
%C A070184 Is this the same as "x^8 = 2 (mod p) has a solution but x^32 = 2 (mod p) doesn't"? It appears that this sequence is exactly the complement of A045316 in A059349. - _M. F. Hasler_, Jun 21 2024
%H A070184 M. F. Hasler, <a href="/A070184/b070184.txt">Table of n, a(n) for n = 1..2000</a>, Jun 22 2024
%o A070184 (PARI)
%o A070184 ok(p, r, k1, k2)={
%o A070184     if (  Mod(r,p)^((p-1)/gcd(k1,p-1))!=1, return(0) );
%o A070184     if (  Mod(r,p)^((p-1)/gcd(k2,p-1))==1, return(0) );
%o A070184     return(1);
%o A070184 }
%o A070184 forprime(p=2,10^5, if (ok(p,2,8,8^2),print1(p,", ")));
%o A070184 /* _Joerg Arndt_, Sep 21 2012 */
%o A070184 (PARI) select( {is_A070184(p)=Mod(2,p)^(p\gcd(8,p-1))==1 && Mod(2,p)^(p\gcd(64,p-1))!=1 && isprime(p)}, primes(1999)) \\ The only composite numbers that would pass the test without isprime are A242880. - _M. F. Hasler_, Jun 22 2024
%o A070184 (Magma) [p: p in PrimesUpTo(15000) | not exists{x: x in ResidueClassRing(p) | x^64 eq 2} and exists{x: x in ResidueClassRing(p) | x^8 eq 2}]; // _Vincenzo Librandi_, Sep 21 2012
%o A070184 (Python)
%o A070184 from itertools import islice
%o A070184 from sympy import is_nthpow_residue, nextprime
%o A070184 def A070184_gen(startvalue=2): # generator of terms >= startvalue
%o A070184     p = max(1,startvalue-1)
%o A070184     while (p:=nextprime(p)):
%o A070184         if is_nthpow_residue(2,8,p) and not is_nthpow_residue(2,64,p):
%o A070184             yield p
%o A070184 A070184_list = list(islice(A070184_gen(),10)) # _Chai Wah Wu_, Jun 23 2024
%Y A070184 Cf. A045315, A059667, A070179 - A070183, A070185 - A070188.
%K A070184 nonn,easy
%O A070184 1,1
%A A070184 _Klaus Brockhaus_, Apr 29 2002