OFFSET
1,2
COMMENTS
Groups of 4 coprime integers (a,b,c,d) are defined by fixing a, then searching for the smallest b > a such that b is coprime to a, searching for the smallest c > b coprime to a and b, then searching for the smallest d > c coprime to a, b and c. If at least one of the 4 sums a^2 + b + c + d, a + b^2 + c + d, a + b + c^2 + d or a + b + c + d^2 is prime, a is in the sequence.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
The groups of four coprimes increase from 1,2,3,5 as the first group, 2,3,5,7 as the second, 3,4,5,7 as the third and so forth. Each group has four chances of producing a prime by squaring one and adding the rest.
EXAMPLE
Consider the quadruple {17, 18, 19, 23}: 17^2 + 18+19+23 = 349; 18^2 + 17+19+23 = 383; 19^2 + 17+18+23 = 419. Three sum to primes but only one is required put 17 in the sequence.
MAPLE
filter:= proc(n)
local S, k, Ss, cands;
S:= {n};
for k from n+1 while nops(S) < 4 do
if max(map2(igcd, k, S))=1 then S:= S union {k}
fi
od;
Ss:= convert(S, `+`);
cands:= {seq(S[i]^2 - S[i] + Ss, i=1..4)};
ormap(isprime, cands)
end proc:
select(filter, [$1..100]); # Robert Israel, Dec 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, May 28 2007
EXTENSIONS
Edited by R. J. Mathar, Dec 17 2014
STATUS
approved