Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8414
| From | Dana DeLouis <dana01@me.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: recursion won't work for some reason |
| Date | 2012-02-09 10:39 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jh07or$htg$1@smc.vnet.net> (permalink) |
> Table[f[n], {n, 1, 30}]
Hi. I see you have a solution with Set, and not Equal.
Just to mention an alternative to using Table.
data = {1 ,1 ,1 ,5 ,4 ,3 ,25 ,23 ,22 ,149 ,130 ,110};
k = {0 ,0 ,-1 ,0 ,0 ,21 ,0 ,0 ,69 ,0 ,0 ,64};
LinearRecurrence[k , data , 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}
= = = = = = = = = = = = =
HTH :>)
Dana DeLouis
Mac & Math 8
= = = = = = = = = = = = =
On Feb 7 , 4:02 am, Roger Bagula <roger.bag...@gmail.com> wrote:
> 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.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: recursion won't work for some reason Dana DeLouis <dana01@me.com> - 2012-02-09 10:39 +0000
csiph-web