%I #12 Sep 08 2022 08:45:46
%S 3,7,19,73,101,107,263,353,359,443,521,523,557,613,733,829,1033,1097,
%T 1103,1109,1129,1283,1307,1601,1613,1699,1811,1949,2111,2237,2293,
%U 2333,2459,2551,2777,2917,3517,3593,3631,3637,4127,4133,4211,4349,4483,4643
%N Primes p such that p^8-8 is also prime.
%H Vincenzo Librandi, <a href="/A163571/b163571.txt">Table of n, a(n) for n = 1..1000</a>
%e For p=3, 3^8-8=6553 is prime, which adds 3 to the sequence.
%e For p=7, 7^8-8=5764793 is prime, which adds 7 to the sequence.
%t lst={};Do[p=Prime[n];If[PrimeQ[p^8-8],AppendTo[lst,p]],{n,7!}];lst
%t Select[Prime[Range[800]], PrimeQ[(#^8 - 8)]&] (* _Vincenzo Librandi_, Apr 15 2013 *)
%o (Magma) [p: p in PrimesUpTo(5000) | IsPrime(p^8-8)]; // _Vincenzo Librandi_, Apr 15 2013
%o (PARI) for(n=1,500, m=prime(n); if(isprime(m^8 -8), print1(m, ", "))) \\ _G. C. Greubel_, Jul 28 2017
%Y Cf. A163570.
%K nonn,easy
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Jul 31 2009
%E Mathematica code corrected by _R. J. Mathar_, Aug 01 2009
|