[go: up one dir, main page]

login
Search: a257379 -id:a257379
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers n such that A257378(n)=A257379(n), so the prime numbers k*n*2^n-1 and k*n*2^n+1 are twin primes for the smallest k such that k*n*2^n-1 is a prime number.
+20
0
4, 7, 9, 11, 27, 40, 63, 80, 120, 173, 227, 358, 445, 525, 767, 1164, 2180, 5368, 7898
OFFSET
1,1
COMMENTS
The k values are in A257378 and A257379.
PROG
(PARI) a8(n) = my(k=1); while(!isprime(k*n*2^n+1), k+=2); k;
a9(n) = my(k=1); while(!isprime(k*n*2^n-1), k+=2); k;
isok(n) = a8(n) == a9(n); \\ Michel Marcus, Sep 15 2019
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Pierre CAMI, Apr 24 2015
STATUS
approved
Smallest odd number k such that k*n*2^n+1 is a prime number.
+10
4
1, 5, 3, 3, 13, 3, 3, 9, 5, 13, 9, 3, 3, 5, 9, 7, 3, 3, 3, 5, 3, 7, 19, 5, 5, 33, 3, 7, 7, 9, 5, 15, 3, 21, 15, 7, 35, 89, 25, 15, 25, 49, 53, 45, 13, 15, 21, 31, 27, 3, 9, 33, 37, 23, 41, 41, 19, 9, 111, 7, 3, 89, 13, 39, 31, 17, 11, 101, 17, 37, 7, 51, 75
OFFSET
1,2
COMMENTS
Conjecture: a(n) exists for every n.
The conjecture is a corollary of Dirichlet's theorem on primes in arithmetic progressions. - Robert Israel, Jan 05 2016
As N increases sum {k, n=1 to N} / sum {n, n=1 to N} tends to 0.818.
If k=1 then n*2^n+1 is a Cullen prime.
Generalized Cullen primes have the form n*b^n+1, I propose to name the primes k*n*2^n-1 generalized Cullen primes of the second type.
EXAMPLE
1*1*2^1+1=3 prime so a(1)=1.
1*2*2^2+1=9 composite, 3*2*2^2+1=25 composite, 5*2*2^2+1=41 prime so a(2)=5.
1*3*2^3+1=25 composite, 3*3*2^3=73 prime so a(3)=3.
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, 73}] (* 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
(PFGW) ABC2 $b*$a*2^$a+1 // {number_primes, $b, 1}
a: from 1 to 10000
b: from 1 to 100000 step 2
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 21 2015
STATUS
approved
Table read by rows: for each k < n and coprime to n, the least x>=0 such that x*n+k is prime.
+10
3
1, 2, 0, 1, 0, 2, 0, 0, 3, 1, 0, 4, 0, 0, 1, 0, 1, 2, 0, 0, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 3, 0, 1, 0, 1, 2, 3, 1, 0, 0, 0, 4, 0, 0, 1, 0, 1, 0, 3, 4, 1, 0, 7, 2, 0, 0, 1, 0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 6, 0, 0, 5, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 4, 3, 1, 0, 0, 0, 0, 0, 10, 0
OFFSET
1,2
COMMENTS
By Dirichlet's theorem, such x exists whenever k is coprime to n.
By Linnik's theorem, there exist constants b and c such that T(n,k) <= b n^c for all n and all k < n coprime to n.
T(n,1) = A034693(n).
T(n,n-1) = A053989(n)-1.
T(prime(n),1) = A035096(n).
T(2^n,1) = A035050(n).
A085427(n) = T(2^n,2^n-1) + 1.
A126717(n) = 2*T(2^(n+1),2^n-1) + 1.
A257378(n) = 2*T(n*2^(n+1),n*2^n+1) + 1.
A257379(n) = 2*T(n*2^(n+1),n*2^n-1) + 1.
EXAMPLE
The first few rows are
n=2: 1
n=3: 2, 0
n=4: 1, 0
n=5: 2, 0, 0, 3
n=6: 1, 0
MAPLE
T:= proc(n, k) local x;
if igcd(n, k) <> 1 then return NULL fi;
for x from 0 do if isprime(x*n+k) then return x fi
od
end proc:
seq(seq(T(n, k), k=1..n-1), n=2..30);
MATHEMATICA
Table[Map[Catch@ Do[x = 0; While[! PrimeQ[x n + #], x++]; Throw@ x, {10^3}] &, Range@ n /. k_ /; GCD[k, n] > 1 -> Nothing], {n, 2, 19}] // Flatten (* Michael De Vlieger, Jan 06 2016 *)
KEYWORD
nonn,tabf
AUTHOR
Robert Israel, Jan 05 2016
STATUS
approved

Search completed in 0.062 seconds