Guest User

Untitled

a guest
Jun 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. suite_rec(n,a):=
  2. {
  3. int j;
  4. L:=[n];
  5. L[0]:=a;
  6. for(j:=1;j<=(n-1);j++)
  7. {
  8. L[j]:=simplify(((3*L[j-1]-2)/(2*L[j-1]-1)));
  9. }
  10. return L[n-1];
  11. }
  12. :;
  13.  
  14. suite(n,a):=
  15. {
  16. int j;
  17. L:=[n];
  18. L[0]:=a;
  19. for(j:=1;j<=(n-1);j++)
  20. {
  21. L[j]:=suite_rec(j,a);
  22. }
  23. return L;
  24. }
  25. :;
Add Comment
Please, Sign In to add comment