# Four sequences with similar pattern of beginning

Determine the missing number in the sequences below
$$7, 9, 13, 17, ?, 29,... \\ 6, 8, ?, 16, 24, 28,...$$

$$8, 11, 29, 51, 125, ?, 293,... \\ 9, 11, 30, 51, 126, ?, 294,...$$

I apologize for the simultaneous quantity, but I believe that the pairs have a similar pattern of beginning, so that resolving one will solve the others. Am I right?
These terms are important results to proceed with the solution of some integrals present in (Almost) Impossible Integrals, Sums, and Series (Problem Books in Mathematics) (English Edition)

• To be clear, you want us to find the next terms in the sequences, not the terms represented by question marks? Commented Nov 15, 2020 at 16:15
• @bobble The first sentence says "determine the missing number", therefore I'd assume you have to find the number represented by the question mark. Commented Nov 15, 2020 at 16:24
• When I posted my first comment it said to find the "next terms", and it has been edited since to clarify the problem. Commented Nov 15, 2020 at 16:26

The answer to the last two sequences should be

171 and 171

Because

Hidden are the primes (in correct order) squared +4 or squared +2, for the first sequence. And the only thing that is different with the second sequence is +5 instead of +4. So in both cases we get the same answer.

So we get

$$2^2 + 4 = 8, 3^2 + 2 = 11, 5^2 + 4 = 29, ...., 13^2 + 2 = 171,....$$ and $$2^2 + 5 = 9, 3^2 + 2 = 11, 5^2 + 5 = 30, ...., 13^2 + 2 = 171,....$$

• Great find... and a funny coincidence too considering your name!
– PDT
Commented Nov 15, 2020 at 18:01

If $$p_n$$ is the sequence of prime numbers, then the $$n$$th term of the first sequence is $$2p_n+3$$ and the second sequence is $$2p_n+2$$ so the complete sequences are $$7, 9, 13, 17, 25, 29,...$$ $$6, 8, 12, 16, 24, 28,...$$