0
$\begingroup$

I wanted to know how can one find an arbitrary number of terms of the non-linear recurrence (using software, like maple)such as $$a_{2n-1}=-\sum_{j=1}^{n}{n+j-1\choose 2j-2}a_{n+j-2}, \ a_{0}=-1$$ $$a_{2n}=-\sum_{j=1}^{n}{n+j\choose 2j-1}a_{n+j-1}.$$ I have tried something like the following code into maple, yet it doesn't yield anything useful,

a := n -> rsolve({a(0) = -1, a(2*n) = -sum(binomial(n + j, 2*j - 1)*a(n + j - 1), j = 1 .. n), a(2*n - 1) = -sum(binomial(n + j - 1, 2*j - 2)*a(n + j - 2), j = 1 .. n)}, a(n), makeproc);.

Edit:I know that there is the Mathematica recurrence table, but don't know how to get it working for this particular example. I have also tried the Rsolve as shown above, it works for some examples like the second-order linear recurrences but not for this one.

The link for recurrence table:-https://reference.wolfram.com/language/ref/RecurrenceTable.html.

$\endgroup$

1 Answer 1

4
$\begingroup$

You could make different definitions of a[n] for n even and n odd. At the same time it is beneficial to use memorization to prevent the calculation of the same a[n] multiple times. E.g:

Clear["Global`*"]
a[0] = 1;
a[n_?OddQ] := 
  a[n] = (m = (n + 1)/2; -Sum[
      Binomial[m + j - 1, 2 j - 2] a[m + j - 2], {j, m}]);

a[n_?EvenQ] := 
  a[n] = (m = 
     n/2; -Sum[Binomial[m + j, 2 j - 1] a[m + j - 1], {j, m}]);


Table[a[i], {i, 0, 10}]

(* {1, -1, 2, -5, 14, -42, 132, -429, 1430, -4862, 16796} *)
$\endgroup$
1
  • 1
    $\begingroup$ Solution: l = Table[a[i], {i, 0, 25}]; FindSequenceFunction[l, n] // FunctionExpand $\endgroup$ Jan 11, 2022 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.