MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: help working with functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60014] Re: help working with functions
  • From: cjs <cjs5212000 at sina.com>
  • Date: Sun, 28 Aug 2005 03:07:55 -0400 (EDT)
  • References: <dep7us$f1s$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I think you can get correct result if you run the following:
   Clear[a]; Clear[seq];
   f[i_, j_, n_] := Module[{k, seq},
    seq = Array[a, n, 0];
     a[0] = 0; a[1] = 1;
    Do[a[k] = a[k - 1] + a[k - 2] + i j^(k - 2), 
    {k, 2, n}];
    seq
    ]
   f[0, 4, 20]


  • Prev by Date: Re: help working with functions
  • Next by Date: Re: my wish list for Mathematica next major version
  • Previous by thread: Re: help working with functions
  • Next by thread: Re: help working with functions