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.
%I A059287 #24 Jun 23 2024 11:26:40 %S A059287 1217,1249,1553,1777,2833,4049,4273,4481,4993,5297,6449,6481,6689, %T A059287 7121,8081,8609,9137,9281,9649,10337,10369,10433,11329,11617,11633, %U A059287 12241,12577,13121,13441,13633,14321,14753,15121,15569,16417,16433,16673 %N A059287 Primes p such that x^16 = 2 has no solution mod p, but x^8 = 2 has a solution mod p. %H A059287 Vincenzo Librandi, <a href="/A059287/b059287.txt">Table of n, a(n) for n = 1..150</a> %t A059287 Select[Prime[Range[PrimePi[20000]]], !MemberQ[PowerMod[Range[#], 16, #], Mod[2, #]] && MemberQ[PowerMod[Range[#], 8, #], Mod[2, #]]&] (* _Vincenzo Librandi_, Sep 21 2013 *) %o A059287 (Magma) [p: p in PrimesUpTo(17000) | not exists{x: x in ResidueClassRing(p) | x^16 eq 2} and exists{x: x in ResidueClassRing(p) | x^8 eq 2}]; // _Vincenzo Librandi_, Sep 21 2012 %o A059287 (PARI) select( {is_A059287(p)=Mod(2,p)^(p\gcd(8,p-1))==1&&Mod(2,p)^(p\gcd(16,p-1))!=1}, primes(1999)) \\ Could any composite number pass this test? - _M. F. Hasler_, Jun 22 2024 %o A059287 (Python) %o A059287 from itertools import islice %o A059287 from sympy import is_nthpow_residue, nextprime %o A059287 def A059287_gen(startvalue=2): # generator of terms >= startvalue %o A059287 p = max(1,startvalue-1) %o A059287 while (p:=nextprime(p)): %o A059287 if is_nthpow_residue(2,8,p) and not is_nthpow_residue(2,16,p): %o A059287 yield p %o A059287 A059287_list = list(islice(A059287_gen(),10)) # _Chai Wah Wu_, Jun 23 2024 %Y A059287 Cf. A000040, A045315, A045316. %Y A059287 Cf. A070184 (same with x^64 instead of x^16). %K A059287 nonn,easy %O A059287 1,1 %A A059287 _Klaus Brockhaus_, Jan 25 2001