How to solve this sequence $165,195,255,285,345,x$
I'm saying that $435$ is the answer to the question. Why? Consider the polynomial $$ p(x)=-\frac{3x^5}{2}+\frac{55x^4}{2}-\frac{375x^3}{2}+\frac{1175x^2}{2}-786x+525$$
Here is a table of values of $p(x)$ on consecutive $x$.
$\begin{array}{|l|c|c|c|c|c|c|}\hline x & 1 & 2& 3& 4& 5&6\\ \hline p(x)&165&195&255&285&345&\color{red}{435}\\\hline \end{array} $
My friend is saying that $390$ is the answer. Why? Consider the polynomial $$g(x)=-\frac{15x^5}{8}+\frac{265x^4}{8}-\frac{1755x^3}{8}+\frac{5375x^2}{8}-\frac{3555x}{4}+570$$
Here is a table of values of $g(x)$ for $x=1,2,3,4,5,6$
$\begin{array}{|l|c|c|c|c|c|c|}\hline x & 1 & 2& 3& 4& 5&6\\ \hline g(x)&165&195&255&285&345&\color{red}{390}\\\hline \end{array} $
How did I calculate the polynomials?
We are calculating a polynomial $p(x)$ that attains values $165,195,255,285,345,k$ (here $k$ is any number number) when $x=1,2,3,4,5,6$. I used a principle known as Lagrange Interpolation and the tool Wolframalpha interpolation calculator. Similarly one can construct even more complex relations using various interpolation techniques.
Conclusion: There is no unique "next term of the sequence", since for arbitrary number $\lambda$, you can always form a relation in which $\lambda$ should be the next term, although some relations may look more natural than others.
In this case:
consider sequence
$$ a_n = 15 \cdot p_n, $$ where $p_n$ is $n$-th prime number.
$a_n$: $\color{gray}{30, 45, 75, 105,} 165, 195, 255, 285, 345, \color{red}{435}, ...$
Another approach but it's just mere an intuitive one.