# Find the $n^{th}$ term of this sequence

Given the following sequence of numbers

1, 3, 7, 9, 13, 15, 21, 25, 27, 31, 33, 37, 43, 45, 49, 51, 55, 57, 63, 67, 69, 73, 75, 79, 85, 91, 93, 97, 99

Can anyone show me the calulation for the nth term?

The sequence of first differences can be seen to repeat 2 sets of numbers

2, 4, 2, 4, 2, 6, 4, 2, 4, 2, 4, 6, 2, 4, 2, 4, 2, 6, 4, 2, 4, 2, 4, 6, 2, 4, 2, 4, 2

I'm mucking about with codes for my lower level students just for fun - then realised I couldn't actually $n$th sequence the code I'd created - oops!

Thanks!

-
The sequence of differences is periodic with period 2, 4, 2, 4, 2, 6, 4, 2, 4, 2, 4, 6. Find a formula for that sequence. Then your original sequence is simply 1 plus the sum of the differences. – lhf Sep 16 '11 at 13:29
You made an error, I think. You have two adjacent first differences of 6: $85 - 79 = 91 - 85 = 6$. – Robert Israel Sep 16 '11 at 19:38

Call the sequence $a(n)$ with $n$ starting from $0$. Then$$a(12n)=42n+1$$ $$a(12n+1)=42n+3$$$$a(12n+2)=42n+7$$ $$...$$$$a(12n+11)=42n+37$$