|   | 1 |  initial version  | 
You cannot use directly a_in but must first go through a string "a_{}{}".format(i,n) to generate the variable name and then use the function eval to get the symbolic variable:
sum(eval("a_{}{}".format(i,n))*binomial(5,i)*binomial(5,n) for i in [0..5] for n in [0..5])
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.