$X_n$ is sequence such that $x_n=x_{n-1}+[\frac{n^2}{4}]$ and $x_0=0$. Find all positve integers $n$ for which $x_n$ is divisible by $n$. [X] means integer part.
Find all $n$ such that $n \mid x_n$ where $x_n = x_{n-1} + \lfloor n^2 / 4 \rfloor$, $x_0 = 0$
-
0Consider the cases where n is either odd or even. The even case is $[(2k)^2/4] = k^2$ and the odd case $[(2k + 1)^2 / 4] = k^2 + k$. That takes care of the rounding operation and furthermore you can write out $x_n$ more explicitely as a sum and might be instructive to look at that sum directly. – 2017-01-05
-
0$x_n $ is given by this [sequence](http://oeis.org/A173196). – 2017-01-05
1 Answers
$$x_{2k}=x_{2k-1}+k^2=x_{2k-2}+2k^2-k=2k^2-k+(2(k-1)^2-(k-1))+x_{2k-4}=\cdots=\sum_{n=1}^{k} 2n^2-\sum_{k=1}^{k} n=\frac{k(k+1)(2k+1)}{3}-\frac{k(k+1)}{2}=\frac{k(k+1)(4k+2-3)}{6}=\frac{k(k+1)(4k-1)}{6}$$ Also $$a_{2k+1}=a_{2k}+k^2+k\\a_{2k+1}=\frac{k(k+1)(4k-1)}{6}+\frac{6k(k+1)}{6}=\frac{k(k+1)(4k+5)}{6}$$ Now splitting into two cases we can see that $$2k+1\mid \frac{k(k+1)(4k+5)}{6}$$ Works only for $k=1$ since $\gcd(2k+1,k)=\gcd(2k+1,k+1)=1$ and $\gcd(4k+5,2k+1)\mid 3$ that implies that only possible solution is $2k+1=1$ or $2k+1=3$ $$2k\mid\frac{k(k+1)(4k-1)}{6}$$ Works for $k=12t+7$ and $k=12t+11$,this is because $$\frac{(k+1)(4k-1)}{12}\in\mathbb{N}$$ Putting it all together for $n=3$ and $n=24t+14,n=24t+22$ we have that $n\mid a_n$