OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
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.
MAPLE
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;
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Walter Kehowski, Jul 06 2006
EXTENSIONS
a(2) corrected and a(24)-a(27) added by Amiram Eldar, Aug 05 2024
STATUS
approved