A035050 a(n) is the smallest k such that k*2^n + 1 is prime.
1, 1, 1, 2, 1, 3, 3, 2, 1, 15, 12, 6, 3, 5, 4, 2, 1, 6, 3, 11, 7, 11, 25, 20, 10, 5, 7, 15, 12, 6, 3, 35, 18, 9, 12, 6, 3, 15, 10, 5, 6, 3, 9, 9, 15, 35, 19, 27, 15, 14, 7, 14, 7, 20, 10, 5, 27, 29, 54, 27, 31, 36, 18, 9, 12, 6, 3, 9, 31, 23, 39, 39, 40, 20, 10, 5, 58, 29, 15, 36, 18, 9, 13
Offset: 0
Keywords
Examples
a(3)=2 because 1*2^3 + 1 = 9 is composite, 2*2^3 + 1 = 17 is prime. a(99)=219 because 2^99k + 1 is not prime for k=1,2,...,218. The first term which is not a composite number of this arithmetic progression is 2^99*219 + 1.
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- Gareth A. Jones and Alexander K. Zvonkin, Groups of prime degree and the Bateman-Horn conjecture, 2021.
- Index entries for sequences related to primes in arithmetic progressions
Crossrefs
Programs
-
Magma
sol:=[];m:=1; for n in [0..82] do k:=0; while not IsPrime(k*2^n+1) do k:=k+1; end while; sol[m]:=k; m:=m+1; end for; sol; // Marius A. Burtea, Jun 05 2019
-
Mathematica
a = {}; Do[k = 0; While[ ! PrimeQ[k 2^n + 1], k++ ]; AppendTo[a, k], {n, 0, 100}]; a (* Artur Jasinski *) Table[Module[{k=1,n2=2^n},While[!PrimeQ[k*n2+1],k++];k],{n,0,90}] (* Harvey P. Dale, May 25 2024 *)
-
PARI
a(n) = {my(k = 1); while (! isprime(2^n*k+1), k++); k;}
Formula
a(n) << 19^n by Xylouris' improvement to Linnik's theorem. - Charles R Greathouse IV, Dec 10 2013
Comments