[seqfan] Re: Integer Sequence Analysis in Mathematica 7

Maximilian Hasler maximilian.hasler at gmail.com
Sat Nov 22 02:28:08 CET 2008


On Fri, Nov 21, 2008 at 8:09 PM, Alexander Povolotsky
<apovolot at gmail.com> wrote:
> Could you if it is allowed  (just to get a real "by example" feel of
> those new exciting  Mathematica 7 capabilities) show us what close
> formula is suggested by Mathematica 7 for
> A001609                  a(n) = a(n-1) + a(n-3).
>        1, 1, 4, 5, 6, 10, 15, 21, 31, 46, 67, 98, 144, 211, 309, 453, 664,
> 973, 1426, 2090, 3063, 4489, 6579, 9642, 14131, 20710, 30352, 44483,
> 65193, 95545, 140028, 205221, 300766, 440794, 646015, 946781, 1387575,
> 2033590, 2980371, 4367946, 6401536, 9381907


I don't think you need M-- (I like the minuses ;-P) for this:

ggf(v)={    local( p,q,B=#v\2 );    B<4 & return;
    if( !#q = qflll( matrix(B, B, x, y, v[x-y+B+1]), 4)[1], return);
    if ( polcoeff( p = Ser( q[,1] ), 0 )<0, p=-p );
    q = Pol( Ser( v )*p );    if( Ser(v) == q /= Pol(p), q)
}

ggf( [       1, 1, 4, 5, 6, 10, 15, 21, 31, 46, 67, 98, 144, 211, 309,
453, 664])
%1 = (3*x^2 + 1)/(-x^3 - x + 1)

Vec(%+O(x^90))
%2 = [1, 1, 4, 5, 6, 10, 15, 21, 31, 46, 67, 98, 144, 211, 309, 453,
664, 973, 1426, 2090, 3063, 4489, 6579, 9642, 14131, 20710, 30352,
44483, 65193, 95545, 140028, 205221, 300766, 440794, 646015, 946781,
1387575, 2033590, 2980371, 4367946, 6401536, 9381907, 13749853,
20151389, 29533296, 43283149, 63434538, 92967834, 136250983,
199685521, 292653355, 428904338, 628589859, 921243214, 1350147552,
1978737411, 2899980625, 4250128177, 6228865588, 9128846213,
13378974390, 19607839978, 28736686191, 42115660581, 61723500559,
90460186750, 132575847331, 194299347890, 284759534640, 417335381971,
611634729861, 896394264501, 1313729646472, 1925364376333,
2821758640834, 4135488287306, 6060852663639, 8882611304473,
13018099591779, 19078952255418, 27961563559891, 40979663151670,
60058615407088, 88020178966979, 128999842118649, 189058457525737,
277078636492716, 406078478611365, 595136936137102, 872215572629818]

Maximilian




More information about the SeqFan mailing list