Hi, I'm trying to create a function which outputs the number of digits you'd have to write down to write every integer from 1 up to the input value. Having defined x and z as variables I used this at one point...
z(x)=((int(log(x,10)))+1)*(1+x-((10^int(log(x,10))))) It gets rejected as does using the 'floor' function. At one point i managed to make it output z(3143) = ((floor(log(3143,10)))+1)*(1+3143-((10^floor(log(3143,10))))) as an expression involving logs but I can't find a way to output a number. any help would be great. Thanks -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org