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!)
A307535 a(n) is the smallest k >= 0 such that 2^(2^n) + k*2^n + 1 is prime. 2

%I #44 Jun 05 2024 14:04:45

%S 0,0,0,0,0,12,15,3,9,202,56,304,635,11095,8948,6415,14441,877,37436

%N a(n) is the smallest k >= 0 such that 2^(2^n) + k*2^n + 1 is prime.

%C 2^(2^n) + a(n)*2^n + 1 = A019434(n) for n <= 4, the known Fermat primes.

%C Conjecture: 2^(2^n) + a(n)*2^n + 1 = A307532(n) for all n > 4.

%C Note that a(9) = A030239(9) = 202.

%F a(n) == 1 (mod 2^n).

%e For n = 5, k = 12; 2^(2^5) + 12*2^5 + 1 = 4294967681 is prime, a(5) = 12.

%t a[n_] := Module[{k = 0}, While[! PrimeQ[2^(2^n) + k*2^n + 1], k++];

%t k]; Array[a, 10, 0]

%o (PARI) isok(k, n) = isprime(2^(2^n) + k*2^n + 1);

%o a(n) = my(k=0); while (!isok(k, n), k++); k; \\ _Michel Marcus_, Apr 15 2019

%o (Python)

%o from sympy import isprime

%o def A307535(n):

%o r = 2**n

%o m, k = 2**r+1, 0

%o w = m

%o while not isprime(w):

%o k += 1

%o w += r

%o return k # _Chai Wah Wu_, Apr 29 2019

%Y Cf. A019434, A030239, A307532.

%K nonn,more,hard

%O 0,6

%A _Amiram Eldar_ and _Thomas Ordowski_, Apr 13 2019

%E a(15) from _Daniel Suteu_, Apr 14 2019

%E a(16)-a(17) from _Chai Wah Wu_, Apr 30 2019

%E a(18) from _Michael S. Branicky_, Jun 05 2024

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 23 06:45 EDT 2024. Contains 375375 sequences. (Running on oeis4.)