OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..120
EXAMPLE
a(3) = 3671 is a term because 3671, 3673, 3677 are three consecutive primes with 3671+3673+3677 = 11021 = 103*107 and 103 and 107 are two consecutive primes.
MAPLE
q:= proc(n) local r, s;
r:= nextprime(floor(sqrt(n)));
s:= n/r;
s::integer and s = prevprime(r)
end proc:
P:= select(isprime, [2, seq(i, i=3..10^7)]):
S:= [0, op(ListTools:-PartialSums(P))]:
map(t -> P[t], select(i -> q(S[i+3]-S[i]), [$1..nops(S)-3]));
MATHEMATICA
prodQ[n_] := Module[{f = FactorInteger[n]}, f[[;; , 2]] == {1, 1} && f[[2, 1]] == NextPrime[f[[1, 1]]]]; q[p_] := PrimeQ[p] && prodQ[p + Plus @@ NextPrime[p, {1, 2}]]; Select[Range[5*10^6], q] (* Amiram Eldar, Feb 14 2022 *)
PROG
(PARI) isok(p) = {if (isprime(p), my(q=nextprime(p+1), f=factor(p+q+nextprime(q+1))); (omega(f) == 2) && (bigomega(f) == 2) && (f[2, 1] == nextprime(f[1, 1]+1)); ); } \\ Michel Marcus, Feb 14 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 13 2022
STATUS
approved