login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Prime(k) such that 2^(k - 1) + prime(k) is also prime.
1

%I #25 Jul 21 2014 17:06:47

%S 2,3,29,89,251,659,937,1307,1453,8179,9391,12097,28499,83969,101209,

%T 120739

%N Prime(k) such that 2^(k - 1) + prime(k) is also prime.

%C The primes indices k are 1, 2, 10, 24, 54, 120, 159, 214, 231, 1027, 1161, 1447, 3100, 8188, 9695, 11363 ...

%C The corresponding primes 2^(k - 1) + prime(k) are 3, 5, 541, 8388697,...

%e 29 is in the sequence because 29 = prime(10) and 2^(10 - 1) + 29 = 512 + 29 = 541 is prime.

%p for i from 1 do

%p p := ithprime(i) ;

%p if isprime(p+2^(i-1)) then

%p printf("%d,\n",p) ;

%p end if;

%p end do: # _R. J. Mathar_, Jul 12 2014

%t p = 2; lst = {}; While[p < 730001, If[ PrimeQ[ 2^(PrimePi@ p-1) + p], AppendTo[lst, p]; Print@ p]; p = NextPrime@ p]; lst (* _Robert G. Wilson v_, Jul 09 2014 *)

%o (PARI) lista(nn) = {ip = 1; forprime(p=2, nn, if (isprime(2^(ip-1)+p), print1(p, ", ")); ip++;);} \\ _Michel Marcus_, Jul 12 2014

%Y Cf. A077375, A227126, A242944, A244913, A244916.

%K nonn,hard

%O 1,1

%A _Juri-Stepan Gerasimov_, Aug 03 2013

%E a(3) - a(9) from __Olivier Gérard__, Aug 01 2013

%E a(10) - a(15) from _Robert G. Wilson v_, Aug 01 2013

%E a(16) from _Robert G. Wilson v_, Jul 09 2014