login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238554 Smallest k such that k + 2^n and k*2^n + 1 are both prime. 4

%I #29 Oct 20 2023 17:20:47

%S 1,1,1,5,1,11,3,9,1,35,15,39,3,39,63,35,1,149,3,419,7,221,25,155,73,

%T 735,69,29,193,261,3,135,81,149,85,125,117,809,303,509,27,699,325,29,

%U 27,285,639,65,61,1911,639,165,295,1295,163,905,175,75,1593,249

%N Smallest k such that k + 2^n and k*2^n + 1 are both prime.

%C If a(n) = 1, then the two primes are the same and they are Fermat primes. - _Michel Marcus_, Mar 01 2014

%H Giovanni Resta, <a href="/A238554/b238554.txt">Table of n, a(n) for n = 0..500</a>

%e 5 is in this sequence because 5 + 2^3 = 13 and 5*2^3 + 1 = 41 are both prime.

%t Table[Module[{k=1,c=2^n},While[!AllTrue[{c+k,k c+1},PrimeQ],k++];k],{n,0,60}] (* _Harvey P. Dale_, Oct 20 2023 *)

%o (PARI) a(n) = {k = 1;while (!(isprime(k + 2^n) && isprime(k*2^n + 1)), k++); k;} \\ _Michel Marcus_, Mar 01 2014

%Y Cf. A019434 (Fermat primes).

%K nonn

%O 0,4

%A _Ilya Lopatin_ and _Juri-Stepan Gerasimov_, Feb 28 2014

%E a(15) corrected and a(24) from _Michel Marcus_, Mar 01 2014

%E Missing term and a(25)-a(59) from _Giovanni Resta_, Mar 01 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 14 01:00 EDT 2024. Contains 375146 sequences. (Running on oeis4.)