Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #9 Jul 03 2022 20:11:31
%S 2,5,23,19,37,47,79,61,107,89,149,103,163,131,191,173,233,229,317,257,
%T 331,271,359,313,373,383,401,397,443,439,457,467,499,509,541,523,569,
%U 593,653,607,709,677,751,691,821,719,863,733,877,761
%N a(1)=2; for n > 1, a(n) is the least new prime such that a(n-1) + a(n) is a multiple of 7.
%F a(n) = A045392((n+1)/2) if n is odd, A045458(n/2) if n is even. - _Jon E. Schoenfield_, Jun 15 2022
%e 2 + 3 = 5 is not a multiple of 7, but 2 + 5 = 7 is, so a(2) = 5.
%e 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.
%e 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.
%t 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
%Y Cf. A045392, A045458.
%K nonn
%O 1,1
%A _Zak Seidov_, Jun 15 2022