

A264098


Smallest odd number k divisible by 3 such that k*2^n + 1 is prime.


2



3, 3, 9, 15, 3, 3, 9, 3, 15, 15, 9, 3, 33, 9, 81, 21, 9, 3, 27, 27, 33, 27, 45, 45, 33, 27, 15, 33, 45, 3, 39, 81, 9, 75, 81, 3, 15, 15, 81, 27, 3, 9, 9, 15, 189, 27, 27, 15, 105, 27, 75, 93, 51, 177, 57, 27, 75, 99, 27, 45, 105, 105, 9, 27, 9, 3, 9, 237
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to approach 2*log(2), as can be seen by plotting the first 31000 terms.
This observation is consistent with the prime number theorem as the probability that k*2^n+1 is prime is 1/(n*log(2)+log(k))/2 for k multiple of 3 so ~ 1/(2*n*log(2)) as n increases, if k ~ 2*n*log(2) then k/(2*n*log(2)) ~ 1.


LINKS

Pierre CAMI, Table of n, a(n) for n = 1..31000


EXAMPLE

3*2^1 + 1 = 7 is prime so a(1) = 3.
3*2^2 + 1 = 13 is prime so a(2) = 3.
3*2^3 + 1 = 25 is composite; 9*2^3 + 1 = 73 is prime so a(3) = 9.


MAPLE

for n from 1 to 100 do
for k from 3 by 6 do
if isprime(k*2^n+1) then
A[n]:= k; break
fi
od
od:
seq(A[n], n=1..100); # Robert Israel, Jan 22 2016


MATHEMATICA

Table[k = 3; While[! PrimeQ[k 2^n + 1], k += 6]; k, {n, 68}] (* Michael De Vlieger, Nov 03 2015 *)


PROG

(PFGW & SCRIPT)
Command: pfgw64 f e500000 in.txt
in.txt SCRIPT FILE:
SCRIPT
DIM k
DIM n, 0
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET k, 3
LABEL loop2
SET k, k+6
SETS t, %d, %d\,; n; k
PRP k*2^n+1, t
IF ISPRP THEN WRITE myf, t
IF ISPRP THEN GOTO loop1
GOTO loop2
(PARI) a(n) = {k = 3; while (!isprime(k*2^n+1), k += 6); k; } \\ Michel Marcus, Nov 03 2015


CROSSREFS

Cf. A035050, A057778, A264097.
Sequence in context: A267296 A122847 A197462 * A223209 A233026 A105423
Adjacent sequences: A264095 A264096 A264097 * A264099 A264100 A264101


KEYWORD

nonn


AUTHOR

Pierre CAMI, Nov 03 2015


STATUS

approved



