%I #13 Nov 21 2023 03:25:11
%S 3,13,23,43,103,163,293,313,433,523,953,1013,1063,1153,1283,1303,1483,
%T 1693,1723,1783,1913,2003,2333,3533,3823,3943,4003,4013,4093,4943,
%U 5483,6043,6133,6173,6473,6803,7523,7573,7603,7673,7853,7993,8513,9283,9343
%N Primes p such that 3p-2 and 3p+2 are primes (see A125272) and its decimal representation finishes with 3.
%C Theorem: If in the triple (3n-2,n,3n+2) all numbers are primes, then n=5 or the decimal representation of n finishes with 3 or 7. Proof: Similar to A136191. Alternative Mathematica proof: Table[nn = 10k + r; Intersection @@ (Divisors[CoefficientList[(3nn - 2) nn(3nn + 2), k]]), {r, 1, 9, 2}]; This gives {{1, 5}, {1}, {1, 5}, {1}, {1, 5}}. Therefore only r=3 and r=7 allow nontrivial divisors (excluding nn=5 itself).
%H Robert Israel, <a href="/A133313/b133313.txt">Table of n, a(n) for n = 1..10000</a>
%p filter:= proc(n) isprime(n) and isprime(3*n-2) and isprime(3*n+2) end proc:
%p select(filter, [seq(i,i=3..10^4,10)]); # _Robert Israel_, Nov 20 2023
%t TPrimeQ = (PrimeQ[ # - 2] && PrimeQ[ #/3] && PrimeQ[ # + 2]) &; Select[Select[Range[100000], TPrimeQ]/3, Mod[ #, 10] == 3 &]
%t Select[Prime[Range[1200]],Mod[#,10]==3&&AllTrue[3#+{2,-2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Oct 18 2019 *)
%Y Cf. A136204 (finishing with 7), A136191, A136192, A125272.
%K nonn,base
%O 1,1
%A _Carlos Alves_, Dec 21 2007