Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Aug 05 2024 08:32:19
%S 1859,331169,2141399,4641629,6633419,8447039,10338119,13526009,
%T 20163059,21603425,24099569,26187119,26483321,28226549,33379569,
%U 33485139,40790009,50139819,52046075,56152179,57170075,59824925,72541799,81638579,104151839,106624359,106791269
%N Integers of the form p^2*q in A120806: x+d+1 is prime for all divisors d of x. Both p and q are odd primes, with p and q distinct. See A054753.
%H Amiram Eldar, <a href="/A120809/b120809.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1) = 1859 since x = 11*13^2, divisors(x) = {1, 11, 13, 11*13, 13^2, 11*13^2} and x+d+1 = {1861, 1871, 1873, 2003, 2029, 3719} 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; y:=simplify(x^(1/3)); if x mod 6 = 5 and not type(y,integer) #clunky and not 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,2]~ && f[,2] != [2,1]~, return(0)); fordiv(f, d, if(!isprime(n + d + 1), return(0))); 1; \\ _Amiram Eldar_, Aug 05 2024
%Y Intersection of A054753 and A120806.
%K nonn
%O 1,1
%A _Walter Kehowski_, Jul 06 2006
%E a(2) corrected and a(24)-a(27) added by _Amiram Eldar_, Aug 05 2024