Sampling a signal in Matlab
What you have appears to be a Fourier series pair, over a very small number of samples.

Probably, by looking at the definition of the Fourier series (which may be different depending on the conventions you choose), and maybe a table of results in a mathematical handbook, you can solve this by inspection. 

I'll call \$x_2[n]\$ the "time domain" signal and a[k] the "frequency domain" signal.

For example, when \$N_1 \ge 2\$ then you have a pure complex exponential in the frequency domain. Therefore you know you'll have a delta-function in the time domain.

If you considered the case \$N_1 = 0\$, you'd have a delta function in the frequency domain and you'd get a pure complex exponential in the time domain.

The case \$N_1=1\$ is slightly more complicated -- that gives a complex exponential windowed by a boxcar in the frequency domain. So you know you have a sinc() (possibly offset in time) in the time domain. 

But your concern about the effort involved in "writing the full expression in paper" indicates you already know how to solve the problem and you are hoping there is a shortcut or easier solution. To me, working out these Fourier relationships on paper (carefully enough to be sure of the answer) would probably be more effort than just doing the calculation in Matlab.