login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes p such that p + 2^p is also a prime.
4

%I #61 Sep 08 2022 08:45:02

%S 3,5,89,317,701

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

%C Different from A056206, where, e.g., at n=89, 89 is not minimal, A056206(89)=29 and not 89.

%C a(6) > 27479. - _Ralf Stephan_, Oct 23 2002

%C Intersection of A000040 and A052007. - _Iain Fox_, Nov 08 2017

%C a(6) > 678561. - _Iain Fox_, Nov 08 2017

%C Every term other than 3 is congruent to 5 (mod 6). - _Arkadiusz Wesolowski_, Nov 14 2017

%C These terms satisfy phi(k + 2^k) = phi(k) + 2^k, where phi is A000010, the Euler totient function. Conjecture: this sequence gives all numbers k that satisfy the condition phi(k + 2^k) = phi(k) + 2^k. - _Juri-Stepan Gerasimov_, May 23 2019

%e q=3, 2^3 + 3 = 11 a prime.

%t Select[Prime@ Range[10^3], PrimeQ[# + 2^#] &] (* _Michael De Vlieger_, Nov 08 2017 *)

%o (PARI) lista(nn) = forprime(p=3, nn, if(ispseudoprime(p + 2^p), print1(p, ", "))) \\ _Iain Fox_, Nov 13 2017

%o (Magma) [p: p in PrimesUpTo(1000) | IsPrime(2^p+p) ] // _Vincenzo Librandi_, Aug 07 2010

%o (Sage) [n for n in (1..1000) if is_prime(n) and is_prime(2^n+n)] # _G. C. Greubel_, May 24 2019

%Y Cf. A000010, A006127, A056206, A056208, A057664, A057665.

%K nonn,hard,more

%O 1,1

%A _Labos Elemer_, Oct 16 2000