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.

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

This page as a plain text file.
%I A070183 #21 May 02 2024 17:33:30
%S A070183 17,41,137,401,433,449,457,521,569,641,761,809,857,919,929,953,977,
%T A070183 1361,1409,1423,1657,1697,1999,2017,2081,2143,2153,2287,2297,2417,
%U A070183 2609,2633,2729,2753,2777,2791,2801,2897,2953,3041,3209,3329,3457,3593,3617
%N A070183 Primes p such that x^6 = 2 has a solution mod p, but x^(6^2) = 2 has no solution mod p.
%H A070183 Robert Israel, <a href="/A070183/b070183.txt">Table of n, a(n) for n = 1..10000</a>
%p A070183 select(p -> isprime(p) and [msolve(x^6=2,p)]<>[] and [msolve(x^36=2,p)]=[] , [seq(i,i=3..10^4,2)]); # _Robert Israel_, May 13 2018
%o A070183 (PARI) forprime(p=2,3700,x=0; while(x<p&&x^6%p!=2%p,x++); if(x<p,y=0; while(y<p&&y^(6^2)%p!=2%p,y++); if(y==p,print1(p,","))))
%o A070183 (Magma) [p: p in PrimesUpTo(5000) | not exists{x: x in ResidueClassRing(p) | x^36 eq 2} and exists{x: x in ResidueClassRing(p) | x^6 eq 2}]; // _Vincenzo Librandi_, Sep 21 2012
%o A070183 (PARI)
%o A070183 ok(p, r, k1, k2)={
%o A070183     if (  Mod(r,p)^((p-1)/gcd(k1,p-1))!=1, return(0) );
%o A070183     if (  Mod(r,p)^((p-1)/gcd(k2,p-1))==1, return(0) );
%o A070183     return(1);
%o A070183 }
%o A070183 forprime(p=2,10^4, if (ok(p,2,6,6^2),print1(p,", ")));
%o A070183 /* _Joerg Arndt_, Sep 21 2012 */
%o A070183 (Python)
%o A070183 from itertools import count, islice
%o A070183 from sympy import nextprime, is_nthpow_residue
%o A070183 def A070183_gen(startvalue=2): # generator of terms >= startvalue
%o A070183     p = max(nextprime(startvalue-1),2)
%o A070183     while True:
%o A070183         if is_nthpow_residue(2,6,p) and not is_nthpow_residue(2,36,p):
%o A070183             yield p
%o A070183         p = nextprime(p)
%o A070183 A070183_list = list(islice(A070183_gen(),20)) # _Chai Wah Wu_, May 02 2024
%Y A070183 Cf. A040992, A049568, A059264, A059667, A070179, A070180, A070181, A070182, A070184, A070185, A070186, A070187, A070188.
%K A070183 nonn,easy
%O A070183 1,1
%A A070183 _Klaus Brockhaus_, Apr 29 2002