P and q are two arithmetic sequences. The first four terms of sequence P are 2,6,10,14. The nth term of sequence Q is 145-3n. The rth term of sequence P has the same values as the rth term of sequence Q. Work out the value of r.