login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Positive integers that can be written in exactly one way as the product ab of positive integers where a+b is composite.
1

%I #14 Apr 29 2019 05:40:37

%S 3,4,5,7,11,12,13,17,18,19,23,28,29,31,34,37,41,43,46,47,52,53,59,61,

%T 67,71,73,79,83,89,97,101,103,106,107,109,113,118,127,131,137,138,139,

%U 142,148,149,151,157,163,166,167,172,173,178,179,181,191,193,197,199

%N Positive integers that can be written in exactly one way as the product ab of positive integers where a+b is composite.

%C n is in the sequence if either: 1) n is an odd prime 2) n = 2 p where p is an odd prime and exactly one of 1+2p and 2+p is prime 3) n = 4 p where p is an odd prime and both 2p+1 and 2+p are prime

%H Robert Israel, <a href="/A082378/b082378.txt">Table of n, a(n) for n = 1..10000</a>

%e 12 is included because of 1+12, 2+6, 3+4, only 2+6 is composite;

%e 16 is not because 2+8 and 4+4 are both composite.

%p S:= NULL: for n from 1 to maxN do ct:= 0; for d in numtheory[divisors](n) do if d^2 > n then next fi; if not isprime(d+n/d) then ct:= ct+1; if ct > 1 then break fi fi; od; if ct = 1 then S:= S,n fi; od: S;

%t M = 200; Reap[For[n = 1, n <= M, n++, ct = 0; Do[If[d^2 > n, Continue[]]; If[CompositeQ[d + n/d], ct++; If[ct > 1, Break[]]], {d, Divisors[n]}]; If[ct == 1, Sow[n]]]][[2, 1]] (* _Jean-François Alcover_, Apr 29 2019, from Maple *)

%K easy,nonn

%O 1,1

%A _Robert Israel_, Sep 03 2004

%E Offset changed by _Robert Israel_, Feb 26 2019