OFFSET
1,1
COMMENTS
Conjecture: a(n) exists for every n.
The conjecture follows from Dirichlet's theorem on primes in arithmetic progressions. - Robert Israel, Jan 05 2016
As N increases, (Sum_{n=1..N} k) / (Sum_{n=1..N} n) approaches 0.833.
If k=1 then n*2^n-1 is a Woodall prime (see A002234).
Generalized Woodall primes have the form n*b^n-1, I propose to name the primes k*n*2^n-1 generalized Woodall primes of the second type.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
1*1*2^1 - 1 = unity, 3*1*2^1 - 1 = 5, which is prime, so a(1) = 3.
1*2*2^2 - 1 = 7, which is prime, so a(2) = 1.
1*3*2^3 - 1 = 23, which is prime, so a(3) = 1.
MAPLE
Q:= proc(m) local k;
for k from 1 by 2 do if isprime(k*m-1) then return k fi od
end proc:
seq(Q(n*2^n), n=1..100); # Robert Israel, Jan 05 2016
MATHEMATICA
Table[k = 1; While[!PrimeQ[k*n*2^n - 1], k += 2]; k, {n, 72}] (* Michael De Vlieger, Apr 21 2015 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM n, 0
DIM k
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
IF n>3000 THEN END
SET k, -1
LABEL loop2
SET k, k+2
SETS t, %d, %d\,; n; k
PRP k*n*2^n-1, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
(PARI) a(n) = k=1; while(!isprime(k*n*2^n-1), k+=2); k \\ Colin Barker, Apr 21 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 21 2015
STATUS
approved