text: The sum beginning with 1 and ending with n can be found by solving in n the equation:\nn(n-1)=2X\nIt is easy to see that if an integer solution n exists it is given by\nn=Int[Sqrt(2X)]\n\nEx: Sqrt(2*55)=10.488\nso, for X=55 take n=10 and verify by\nthe formula n(n+1)/2=X\n\nMore generally, if you look for ALL the series of consecutive integers summing up to X, you want to write\nX=A+(A+1)+(A+2)+.. (A+n)\nThen look for the sequence:\n\nA(n)= X/n - (n-1)/2\nfor n=1,2,3... and the greatest n to try is N=[Sqrt(2X)].\n\nIF A(k) IS INTEGER then you have the k-terms sum starting with A(k).\nThis gives an easy program to write down.\n\nExample: X=55\n55=27+28\n55=9+10+11+12+13 (n=5 terms)\n55=1+2+..+9+10 (n=10 terms)\nand \nA(2)=X/2-1/2=27\nA(5)=X/5-4/2=9\nA(10)=X/10-9/2=1