login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A329941
Least prime, p, such that 2*p*3^n - 1 and 2*p*3^n + 1 are twin primes.
0
2, 11, 2, 5, 43, 29, 53, 311, 113, 109, 367, 859, 647, 11, 2, 619, 13, 1051, 157, 2801, 3767, 5, 337, 1721, 3517, 41, 4013, 1879, 1873, 13649, 4637, 2909, 8387, 6521, 1453, 6599, 1277, 4801, 167, 1031, 11213, 4129, 4933, 199, 1427, 859, 9227, 5581, 863, 11959, 10453
OFFSET
1,1
EXAMPLE
2*2*3^1 - 1 = 11; 11 and 13 are twin primes so a(1)=2.
2*11*3^2 - 1 = 197; 197 and 199 are twin primes so a(2)=11 as no other prime p < 11 gives twin primes.
MATHEMATICA
Array[Block[{p = 2}, While[! AllTrue[2 p 3^# + {-1, 1}, PrimeQ], p = NextPrime@ p]; p] &, 51] (* Michael De Vlieger, Dec 24 2019 *)
PROG
(PARI) a(n) = {my(p=2); while (!isprime(2*p*3^n - 1) || !isprime(2*p*3^n + 1), p = nextprime(p+1)); p; } \\ Michel Marcus, Nov 25 2019
CROSSREFS
Cf. A130327.
Sequence in context: A298444 A224480 A037299 * A347121 A341512 A276676
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 24 2019
STATUS
approved