%I #11 Aug 05 2024 05:20:11
%S 935,305015,2339315,3690185,14080121,14259629,16143005,17754869,
%T 18679409,26655761,29184749,47372135,80945699,82768529,87102509,
%U 123581021,131225889,141328979,177392861,224285529,289174109,348095519,350342279,359093699,372823805,403685135
%N Integers x of the form p*q*r in A120806: x+d+1 is prime for all divisors d of x, where p, q and r are distinct odd primes. See A007304.
%H Amiram Eldar, <a href="/A120810/b120810.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1) = 935 since x = 935 = 5*11*17, divisors(x) = {1, 5, 11, 17, 5*11, 5*17, 11*17, 5*11*17} and x+d+1 = {937, 941, 947, 953, 991, 1021, 1123, 1871} are all primes.
%p with(numtheory); is3almostprime := proc(n) local L; if n in [0,1] or isprime(n) then return false fi; L:=ifactors(n)[2]; if nops(L) in [1,2,3] and convert(map(z-> z[2], L), `+`) = 3 then return true else return false fi; end; L:=[]: for w to 1 do for k from 1 while nops(L)<=50 do x:=2*k+1; if x mod 6 = 5 and issqrfree(x) and is3almostprime(x) and andmap(isprime,[x+2,2*x+1]) then S:=divisors(x); Q:=map(z-> x+z+1, S); if andmap(isprime,Q) then L:=[op(L),x]; print(nops(L),ifactor(x)); fi; fi; od od;
%o (PARI) is(n) = my(f); if(!(n%2), return(0)); f = factor(n); if(f[,2] != [1,1,1]~, return(0)); fordiv(f, d, if(!isprime(n + d + 1), return(0))); 1; \\ _Amiram Eldar_, Aug 05 2024
%Y Intersection of A007304 and A120806.
%Y Cf. A120807, A120808, A120809.
%K nonn
%O 1,1
%A _Walter Kehowski_, Jul 06 2006
%E a(16)-a(26) from _Amiram Eldar_, Aug 05 2024