How to find pattern in $1,2,8,9,15,20,26,38…$ infinite sequence?

While I was investigating some specific types of prime numbers I have faced with the following infinite sequence :

$1,2,8,9,15,20,26,38,45,65,112,244,303,393,560,....$

I tried to find recursive formula using Maple and it's listtorec command, so up to $393$ I got the next output:

$f(n+3) = ((-10604990407411886564453040+8614360900967683126093782*n$ $-1437788330056801496567841*n^2-20019334790519891406942*n^3$ $+10676199651161684501481*n^4)*f(n+1)$ $+(-1637719982644311036922320-2457276199701830407970234*n$ $-480059310080505210547097*n^2+383671472063948372228234*n^3$ $-33849767081583104776903*n^4)*f(n+2))$ $/(-936042047504931985146406*n -3812415630664251269364960$ $+337414858035611215686569*n^2+50641450188283496191324*n^3$ $-8211420729473965803551*n^4)$

but when I added $560$ to list Maple sent me message FAIL.

So, my question is : how can I find pattern for this sequence if it exists ?

• You might noting that the recursive formula is much more complicated than the first 14 numbers in the sequence. This usually a clue that that the formula may not extend to higher terms. – Henry Sep 28 '11 at 8:43
• I've always hated "problems" like this...any finite sequence is the beginning of uncountably many infinite sequences. – user5137 Sep 28 '11 at 14:32

So your sequence is "Numbers $n$ such that $6*10^n+1$ is prime". I assume you're looking for a formula, but if there was a closed-form expression for these numbers, we could find arbitrarily large prime numbers! The largest known prime has 12978189 digits and right now there is a 250,000 dollar prize to whoever finds a prime number with at least 1,000,000,000 digits (see http://www.eff.org/awards/coop). So if you find a formula for these numbers, please tell me.
• @spin,I am far away from discovering formula but one thing I know for sure...none of these numbers is divisible by $6$ – Peđa Terzić Sep 28 '11 at 17:32
Doing so gives in your case gives that the sequence is numbers $n$ such that $6\times10^n+1$ is prime.