The example should read: Example: a(4)=5 as T(4)=10=1+1+4+4,1+2+3+4,1+3+3+3,2+2+2+4,2+2+3+3 Jon Perry perry at globalnet.co.uk http://www.users.globalnet.co.uk/~perry/maths/ http://www.users.globalnet.co.uk/~perry/DIVMenu/ BrainBench MVP for HTML and JavaScript http://www.brainbench.com