Following up on a comment, below is the annotated transcript of @pco's (Patrick) proof on aops.
1) For integer $k\in[0,3n]$, the unique polynomial $P_{k}$ of degree $3n$
A polynomial of degree $N$ is uniquely defined by its $N$ roots up to a constant factor, and in this case there is an additional condition to determine the constant factor, therefore the claim of "unique" .
and such that $P_{k}(k)=1$ and $P_{k}(p)=0$ for any integer integer $p\neq k\in[0,3n]$
This is shorthand notation for $p \in \{0, 1, 2, \ldots, 3n\} \setminus \{k\}\,$. Purists will frown ;-)
is: $P_{k}(x)=\frac{1}{(-1)^{3n-k}k!(3n-k)!}\prod_{i=0,i\neq k}^{i=3n}(x-i)$.
Given the roots, $P_{k}$ must be of the form $P_{k}(x)= \lambda_k \, \prod_{i=0,i\neq k}^{3n}(x-i)$ for some constant $\lambda_k$. The remaining condition $P_{k}(k)=1$ gives $\lambda_k = \frac{1}{\prod_{i=0,i\neq k}^{3n}(k-i)}$ $= \frac{1}{\prod_{i=0}^{k-1}(k-i)} \cdot \frac{(-1)^{3n-k}}{\prod_{i=k+1}^{3n}(i-k)} $ $= \frac{1}{(-1)^{3n-k}k!(3n-k)!}$.
Notice that $P_{k}(3n+1)=(-1)^{3n-k}\binom{3n+1}{k}$
$P_{k}(3n+1) = \frac{1}{(-1)^{3n-k}k!(3n-k)!} \prod_{i=0,i\neq k}^{3n}(3n+1-i) = \frac{(-1)^{3n-k}}{k!(3n-k)!} \cdot \frac{\prod_{i=0}^{3n}(3n+1-i)}{3n-k+1} = \frac{(-1)^{3n-k} \, (3n+1)!}{k!(3n-k+1)!}\,$.
2) So the requested polynomial is well defined by its values for 0 to $3n$ and we have :
$P(x)=\sum_{k=0}^{k=n}2P_{3k}(x)+\sum_{k=0}^{k=n-1}P_{3k+1}(x)$
The equality holds because each of the terms on the RHS is $1$ at exactly one of $\{0,1,2,\ldots,3n\}$ while $0$ at all others, and that's how the "polynomial is well defined" part should be interpreted. $\,P(x)$ is not otherwise fully determined at this point, since $n$ is yet unknown.
3) We can now compute $S=P(3n+1)$
$S=\sum_{k=0}^{k=n}2(-1)^{3n-3k}\binom{3n+1}{3k}+\sum_{k=0}^{k=n-1}(-1)^{3n-3k-1}\binom{3n+1}{3k+1}$
Let $A=\sum_{k=0}^{k=n}(-1)^{3k}\binom{3n+1}{3k}$, $B=\sum_{k=0}^{k=n}(-1)^{3k+1}\binom{3n+1}{3k+1}$ and $C=\sum_{k=0}^{k=n-1}(-1)^{3k+2}\binom{3n+1}{3k+2}$.
We have :
$S=(-1)^{3n}2A+(-1)^{3n}B+1$
That's just the previous form written for $x=3n+1\,$.
$(1-1)^{3n+1}=0=A+B+C$
$(1-j)^{3n+1}=A+Bj+Cj^{2}$ where $j$ is one one of the complex root of $x^{3}=1$.
$(1-j^{2})^{3n+1}=A+Bj^{2}+Cj$
These follow from the binomial expansion of $(1-x)^{3n+1}$ for $x=1, j, j^2$ respectively, using that $j^3=1, 1+j+j^2=0$. The technique of "extracting" powers in an arithmetic progression from a polynomial (or series) is known as series multisection, as was pointed out to me while posting this.
And : $A=\frac{(1-j)^{3n+1}+(1-j^{2})^{3n+1}}{3}$ and $B=\frac{j^{2}(1-j)^{3n+1}+j(1-j^{2})^{3n+1}}{3}$
Follows from solving the above for $A,B,C$.
$S=(-1)^{3n}2A+(-1)^{3n}B+1=1-j(j-1)^{3n}-j^{2}(j^{2}-1)^{3n}$
If $n$ is odd ($n=2p+1$), we have $S=1+(-1)^{p}3^{3p+2}$
If $n$ is even ($n=2p$), we have $S=1+(-1)^{p}3^{3p}$
$\,j^2=-1-j\,$, and $\,(j^2-1)^{3n}$ $= (j+1)^{3n} \cdot (j-1)^{3n}$ $= (-j^2)^{3n}(j-1)^{3n}=(-1)^{3n}(j-1)^{3n}\,$.
4) In our case, we need to solve $S=730=3^{6}+1$
Clearly $p=2$ and $n=4$
Q.E.D.
used the cube roots or the n^th roots of unity to solve the questions involving a certain periodicity in the function
The technique is known as series multisection.I did not get any satisfactory answer to the question stated above
There were links posted to full solutions. I suggest you narrow down what was not satisfactory with those. – dxiv Jan 03 '18 at 03:48$P(k)-1$ $=$ $\frac{2Ime^{\frac{\pi i}{3}}\omega^{k}}{\sqrt 3}$ " But how did he get this thing. Is this some sort of formula or rule?
– Rohan Shinde Jan 03 '18 at 04:09