Entering recurrence relation into wolframalpha

I am trying to figure out if there is a closed form for this function:

defined by

It should look something like a sum or product of binomial coefficients (I think). I found the Piecewise mathematica function, but I don't know how to tell wolframalpha that it is a recurrence relation.

Re: Entering recurrence relation into wolframalpha

The initial conditions are all negative numbers give zero (similar to how gives zero if ). Can I use something like

Code:

`RSolve[f(n) == n+1+f(n-2)+f(n-6)+f(n-18)+f(n-54) && RecurrenceTable[f(k)=0,{k,-54,-1}], f(n), n]`

??

Wolframalpha doesn't understand that formula, though. When I tried a simpler one, it gave me a closed form in terms of a DifferenceRoot, so there may not be any general closed form. What I am hoping to evaluate is:

Then for each , I want to know if this limit converges to something nonzero:

It is a relation I found while examining primitive roots of . It seems certain sums can fall seemingly arbitrarily in a relatively fixed range, and I want to know if it matters if I am off by a couple powers of 3 when taking the limit of that function over another function (as n approaches infinity).

Re: Entering recurrence relation into wolframalpha

Seems like generating functions might be the way to go.

is the generating function for where .

Re: Entering recurrence relation into wolframalpha

For anyone who is interested, this turned out to be much simpler than I expected. If , let be the root of with smallest magnitude (in the complex plane). It turns out that these polynomials always seem to have exactly two real roots, and the real roots have the smallest magnitude. Then, the limit I was interested in:

for any positive integer .

Just thought it was kinda cool that it wound up with such a simple answer.