%I #14 Jan 21 2019 20:09:33
%S 2,3,4,11,12,18,20,30,35,47,108,113,118,127,136,162,165,212,502,656,
%T 1131,1560,1620,1966,2293,4184,5568
%N Numbers k such that there is at least one pair of twin primes 3^k - 3^j -+ 1 with k/2 <= j < k.
%p isA181542 := proc(n) local nh,k,p; if type(n,'even') then nh := n/2; else nh := (n+1)/2; end if; for k from n-1 to nh by -1 do p := 3^n-3^k-1 ; if isprime(p) and isprime(p+2) then return true; end if; end do ; false; end proc:
%p for n from 1 do if isA181542(n) then print(n); end if; end do; # _R. J. Mathar_, Feb 05 2011
%Y Cf. A181551, A181515, A181523.
%K nonn
%O 1,1
%A _Pierre CAMI_, Jan 29 2011, Feb 05 2011