recursion won't work for some reason

• To: mathgroup at smc.vnet.net
• Subject: [mg124790] recursion won't work for some reason
• From: Roger Bagula <roger.bagula at gmail.com>
• Date: Tue, 7 Feb 2012 04:01:18 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

This recursion is translated from a FindSequenceFunction[]:
won't work in version 8?
Clear[a, n]
a[1] == 1; a[2] == 1; a[3] == 1; a[4] == 5; a[5] == 4; a[6] == 3;
a[7] == 25; a[8] == 23; a[9] == 22; a[10] == 149; a[11] == 130;
a[12] == 110;
a[n_] := a[n] =
64* a[-12 + n] + 69 *a[-9 + n] + 21 *a[-6 + n] - a[-3 + n]
Table[a[n], {n, 1, 30}]
I actually have hundreds like this that work with no problems...from
version 5 and before.
The FindSequenceFunction is:
f[n_] = FindSequenceFunction[{1, 1, 1, 5, 4, 3, 25, 23, 22, 149, 130,
110, 785, 693, 623, 4389, 3880, 3397, 23977, 21115, 18684, 131893,
116502, 102680, 724705, 638985, 563949, 3980357, 3512812, 3098935,
21873593, 19295871, 17024690, 120159701, 106019274, 93536946,
660211505, 582473085, 513900795, 3627162981, 3200166736,
2823410521, 19928207945, 17582033699, 15512135608, 109487029365,
96597344158, 85225004732, 601533119489, 530715145745,
468234819865}, n]
Table[f[n], {n, 1, 30}]
{1, 1, 1, 5, 4, 3, 25, 23, 22, 149, 130, 110, 785, 693, 623, 4389,
3880, 3397, 23977, 21115, 18684, 131893, 116502, 102680, 724705,
638985, 563949, 3980357, 3512812, 3098935}

The original sequence is a polynomial expansion:
q[x_] = (-2 + 3 x - 8 x^3 + 8 x^4)
f[x_] = ExpandAll[x^4*q[1/x]]
a = Table[8^(1 + Floor[n/3])*SeriesCoefficient[
Series[1/f[x], {x, 0, 50}], n], {n, 0, 50}]

Any help that you can give will be appreciated.

• Prev by Date: Insets don't line up properly with Axes?
• Next by Date: Re: Mathematica question
• Previous by thread: Insets don't line up properly with Axes?
• Next by thread: Re: recursion won't work for some reason