I have a sequence of numbers below...
$1, 2, 4, 7, 11, 16 ...$
You get this list by starting at $1$ then add $1, 2, 3, 4, 5 ...$
Given a number $n$, how can I determine if it will show up in this pattern of numbers?
I have a sequence of numbers below...
$1, 2, 4, 7, 11, 16 ...$
You get this list by starting at $1$ then add $1, 2, 3, 4, 5 ...$
Given a number $n$, how can I determine if it will show up in this pattern of numbers?
The $k$th term in your sequence is $1+\frac{k(k-1)}{2}$. [See triangular numbers.] Given your number $n$, you just need to check if it is of this form or not.