OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
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.
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; 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;
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Walter Kehowski, Jul 06 2006
EXTENSIONS
a(16)-a(26) from Amiram Eldar, Aug 05 2024
STATUS
approved