# Solving a recurrence relation with constraints

I have the following recurrence relation with complex coefficients:

c[n] == Sqrt[n-1] c[n-1] + Sqrt[n] c[n+1]


I also have the constraint that

$$\sum_n |c_n|^2 = 1$$

Unfortunately, RSolve doesn't give me a solution.

Ideally, I would like to find the (numerical) distribution of these coefficients for which $$\sum_n n |c_n|^2 = \bar{n}$$, where I can choose $$\bar{n}$$ as I like. However, I am not sure if solutions exist for arbitrary chosen $$\bar{n}$$.

• If you have a solution with a finite absolute sum, you can scale it to sum to 1 Dec 16 '19 at 18:35
• Is the constraint $\,|c_1|^2+|c_2|^2+\dots=1?\,$ Your $\,\sum_n\,$ is not explicit enough. Dec 16 '19 at 22:55

In the limit of large n, the recurrence relation reduces to c[n+1] == -c[n-1]]. Consequently, the sum in the question is unbounded unless c[n] == 0 for some finite n and beyond. However, this implies that all c[n] vanish, unless a coefficient in the recurrence relation also vanishes at the same value of n that the particular c[n] vanishes. There is only one value of n for which a coefficient vanishes, namely n = 1, in which case,

RecurrenceTable[{c[n] == Sqrt[n - 1] c[n - 1] + Sqrt[n] c[n + 1],
c == 0, c == 1}, c, {n, 10}]
(* {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} *)


The sequence beginning with c == -1 also satisfies the constraint, of course.

I do not believe that there are any other such sequences. For instance,

RecurrenceTable[{c[n] == Sqrt[n - 1] c[n - 1] + Sqrt[n] c[n + 1],
c == 1., c == 0}, c, {n, 9999989, 10000000}]
(* {-0.00529902, 0.0196947, 0.00530525, -0.019693 ,
-0.00531147, 0.0196914, 0.0053177 , -0.0196897,
-0.00532393, 0.019688 , 0.00533015, -0.0196863} *)