Hi Bon,
29 would be absolutely great. There are many answers to your question, none of them obvious. Here's one:
List the primes in order, so that p(1) = 2, p(2) = 3, p(3) = 5, p(4) = 7, ....
Then the sequence is given by s(0) = 3, s(n) = s(0) + sum(j=1...n)(1 + (p(j+18)-p(19)) / 2).
Here's some more detail on that one:
p(19), p(20), .... = {67, 71, 73, 79, 83, 89, 97, 101,...}
sum(j=1,1) = 1 + (67-67)/2 =1
sum(j=1,2) = 1 + 1+(71-67)/2 = 1 + 3 = 4
sum(j = 1,2,3) = 4 + 1 + (73-67)/2 = 4 + 4 = 8
sum(j = 1,2,..4) = 8 + 1 + (79-67)/2 = 8 + 7 = 15
sum(j = 1,2,..5) = 15 + 1 + (83-67)/2 = 15 + 9 = 24
sum(j = 1,2,..6) = 24 + 1 + (89-67)/2 = 24 + 12 = 36
sum(j = 1,2,..7) = 36 + 1 + (97-67)/2 = 36 + 16 = 52
sum(j = 1,2,..8) = 52 + 1 - (101-67)/2 = 52 + 18 = 70
So sum(j=1,...)(1 + (p(j+18)-p(19)) / 2) = (1, 4, 8, 15, 24, 36, 52, 70...)
s(0) = 3, 3 + sum(j=1,...) = (4, 7, 11, 18, 27, 39, 55, 73...)
So the next three terms would be 39, 55, 73.
Another possibility is phi(n), Euler's totient function. It is the count of positive integers <= n that are relatively prime to n. For example, phi(4) = 2, since 4 and 3 are relatively prime, as are 4 and 1, but 4 and 2 share common factors as do 4 and 4. phi(4,5,6,7,8,9,10,11...) = 4,2,6,4,6,4,10...
In that case, the formula for the sequence is given by s(0) = 3, s(n) = s(0) + sum(j=1...n)(1 + (phi(j+4)-phi(5)) / 2).
The next three terms of that sequence are 39, 53, 72.
Yet another way is to define a polynomial that takes the value f(1) = 3, f(2) = 4, f(3) = 7,...
That turns out to be 14 - x*71.35 / 3.0 + x^2 * 17.625 - x^3 * 17.0/3.0 + 0.875 x^4 - 0.05*x^5
In that case, the next three terms are 28, -4, -115.
But for my money, the person who gave you the sequence should have written down 27.
Hope that helps.
Regards,
Mike N.
Mike N.
10/23/14