Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

list of intermediate values of this function

Posted 12 years ago
POSTED BY: Luis Ledesma
2 Replies
POSTED BY: Daniel Lichtblau

You can always just make a Table of values:

Table[p[n], {n, 4, 14}]

But I'm guessing this isn't what you want... You can of course always define it to be a recurse function on lists:

p[1] := {5};
p[2] := {1};
p[3] := {2};
p[n_] := {p[n - 1], Last@p[n - 1] + Last@p[n - 3]} /; n > 3;

p[14]

{{{{{{{{{{{{2}, 7}, 8}, 10}, 17}, 25}, 35}, 52}, 77}, 112}, 164}, 241}
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard