1. The FOR loop from i = 0 to i = n loops n + 1 times, so instead of creating 1337 random numbers, you get 1338 random numbers
2. The memory requirement would be really huge, so you'll need to upgrade the RAM.
3.
BEGIN GenerateRandoms(n)
nums = array of size 1000
FOR i = 1 TO...