A329736 Smallest odd prime P such that P*3*2^n - 1 and P*3*2^n + 1 are twin primes.
3, 5, 3, 5, 43, 11, 3, 19, 17, 5, 113, 59, 317, 331, 307, 241, 127, 829, 23, 149, 127, 11, 3023, 1091, 787, 971, 1523, 2741, 727, 1051, 227, 211, 727, 89, 1163, 71, 367, 1031, 577, 89, 1213, 1151, 3, 1021, 283, 2699, 4933, 59, 647, 709, 3083, 541, 1483, 2069
Offset: 1
Keywords
Examples
3*3*2^1 - 1 = 17, 17 and 19 are twin primes so a(1)=3. 5*3*2^2 - 1 = 59, 59 and 61 are twin primes so a(2)=5. 3*3*2^3 - 1 = 71, 71 and 73 are twin primes so a(3)=3. 5*3*2^4 - 1 = 119, 119 and 121 are twin primes so a(4)=5.
Links
- Daniel Starodubtsev, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Array[Block[{p = 3}, While[! AllTrue[3 p*2^# + {-1, 1}, PrimeQ], p = NextPrime@ p]; p] &, 54] (* Michael De Vlieger, Nov 21 2019 *)
-
PARI
for(n=1,54,my(m=3*2^n);forprime(k=3,oo,my(j=k*m);if(ispseudoprime(j-1)&&ispseudoprime(j+1),print1(k,", ");break))) \\ Hugo Pfoertner, Nov 21 2019
-
PARI
a(n) = my(p=3, q); while (!isprime(q=p*3*2^n - 1) || !isprime(q+2), p = nextprime(p+1)); p; \\ Michel Marcus, May 06 2020