OFFSET
1,1
FORMULA
EXAMPLE
2 + 3 = 5 is not a multiple of 7, but 2 + 5 = 7 is, so a(2) = 5.
5 + 2 = 7 is a multiple of 7, but 2 is already a term; 5 + 3 = 8, 5 + 7 = 12, ..., 5 + 19 = 24 are not multiples of 7, but 5 + 23 = 28 is, so a(3) = 23.
23 + 5 = 28 is a multiple of 7, but 5 is already a term; 19 is the next prime p such that 7 divides 23 + p, so a(4) = 19.
MATHEMATICA
s = {2}; Do[p = 3; a = s[[-1]]; While[MemberQ[s, p] || Mod[a + p, 7] != 0, p = NextPrime[p]]; AppendTo[s, p], {100}]; s
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 15 2022
STATUS
approved