Select a number and it will be generated!!! Click see inside to see how simple this is. One sprite, 14 blocks (i think), 2 variables. This works to a very high number not just 1000.
You can remix but please give credit. @Dragonmyflesh made a better version. (with pen)