kill(all)$

van=facebook.com/LearningCalculus;

foo:solve([a+b=6,a*b=7],[a,b]);

/* notice a and b are flipped in the two solutions */;

first(foo);

for n : 1 thru 5 do
(
    print(n, ":", expand(ev(a^n + b^n, first(foo))))
);