login
Primes p such that p^7 + 2 is also prime.
2

%I #17 Sep 08 2022 08:46:13

%S 53,449,521,653,881,983,1031,1451,1571,1733,1889,2129,2729,3191,4259,

%T 5879,6173,7499,7829,8861,9743,9923,10271,10313,11423,11903,12041,

%U 12149,12263,12329,12641,12893,14591,14723,14771,14813,15401,16493,17783,18713,19259

%N Primes p such that p^7 + 2 is also prime.

%C Subsequence of primes of A216980. - _Michel Marcus_, Aug 24 2015

%e 53^7 + 2 = 1174711139839 is a prime.

%p A261537:=n->`if`(isprime(n) and isprime(n^7+2), n, NULL): seq(A261537(n), n=1..5*10^4); # _Wesley Ivan Hurt_, Apr 14 2017

%t Select[Prime[Range[2500]], PrimeQ[#^7 + 2] &]

%o (Magma) [p: p in PrimesUpTo(20000) | IsPrime(p^7+2)];

%o (PARI) first(m)=my(v=vector(m));i=1;for(j=1,m,while(!isprime((prime(i)^7)+2),i++);v[j]=prime(i);i++);v; \\ _Anders Hellström_, Aug 24 2015

%Y Cf. A000040, A216980.

%Y Subsequence of A007528.

%Y Cf. similar sequences listed in A261536.

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Aug 24 2015