login
Composite numbers whose prime factors are twin primes.
1

%I #22 Feb 18 2015 10:25:00

%S 9,15,21,25,27,33,35,39,45,49,51,55,57,63,65,75,77,81,85,87,91,93,95,

%T 99,105,117,119,121,123,125,129,133,135,143,145,147,153,155,165,169,

%U 171,175,177,183,187,189,195,203,205,209,213,215,217,219,221

%N Composite numbers whose prime factors are twin primes.

%e 221 = 13 * 17 (13 is the twin prime of 11 and 17 is the twin prime to 19).

%t nn = 100; p = Prime[Range[nn]]; t = {}; Do[If[p[[n + 1]] - p[[n]] == 2 || p[[n]] - p[[n - 1]] == 2, AppendTo[t, p[[n]]]], {n, nn - 1}]; Select[Range[2, t[[-1]]], ! PrimeQ[#] && Complement[Transpose[FactorInteger[#]][[1]], t] == {} &] (* _T. D. Noe_, May 21 2013 *)

%Y Cf. A077800 (twin primes).

%K easy,nonn

%O 1,1

%A _Walter Carlini_, Jan 06 2005; corrected Jan 22 2005

%E New name, typo in example fixed by _Zak Seidov_, May 20 2013