cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A329941 Least prime, p, such that 2*p*3^n - 1 and 2*p*3^n + 1 are twin primes.

This page as a plain text file.
%I A329941 #17 Feb 23 2020 16:59:19
%S A329941 2,11,2,5,43,29,53,311,113,109,367,859,647,11,2,619,13,1051,157,2801,
%T A329941 3767,5,337,1721,3517,41,4013,1879,1873,13649,4637,2909,8387,6521,
%U A329941 1453,6599,1277,4801,167,1031,11213,4129,4933,199,1427,859,9227,5581,863,11959,10453
%N A329941 Least prime, p, such that 2*p*3^n - 1 and 2*p*3^n + 1 are twin primes.
%e A329941 2*2*3^1 - 1 = 11; 11 and 13 are twin primes so a(1)=2.
%e A329941 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.
%t A329941 Array[Block[{p = 2}, While[! AllTrue[2 p 3^# + {-1, 1}, PrimeQ], p = NextPrime@ p]; p] &, 51] (* _Michael De Vlieger_, Dec 24 2019 *)
%o A329941 (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
%Y A329941 Cf. A130327.
%K A329941 nonn
%O A329941 1,1
%A A329941 _Pierre CAMI_, Nov 24 2019