Let's say you have a computer program that counts natural numbers from 1 to infinity...

Let's say you have a computer program that counts natural numbers from 1 to infinity. Between printing the number [math]k[/math] and [math]k + 1[/math], it waits exactly [math]k[/math] seconds.

It's clear that it would take [math]1 + 2 + 3 + ...[/math] seconds for the program to finish the counting. Any sane person would now argue that this would be infinite amount of time, i.e. the program never finishes its task. A mathematician would claim that the program only needs [math]-\frac{1}{12}[/math] seconds, i.e. we would immediately get the results out.

It's obvious that the mathematician is wrong with this one -- Anyone can test this out using a simple script.

Actually, -1/12 means you got the result in the past

Sorry op, I actually ran the program and got it all printing a fraction of a second before I started it.

clearly this is incorrect, because there is no computer that can count up to infinity, so there is no computer that can execute such program.

but could imagine a settings where gods solve problem that require infinite time to calculate with this trick of making the computer wait k seconds each operation, it would be pretty rad actually

Since numbers are stored in memory spaces of n bytes, your program would eventually only print the number 111111... (n times) after 11111... seconds

You [math]\textbf{can}[/math] make a computer to count to infinity, and you only need a constant amount of memory for that, too. Just make it print some symbol after another, and interpret it as a natural number in unary.

Ok but then if would print - 1/12, because the series of printed values 1+1+1+1..... is less than the series of second spent waiting 1+2+3+...., but the series 1+1+1+1 is greater than - 1/12, therefore

-1/12

>because the series of printed values 1+1+1+1..... is less than the series of second spent waiting 1+2+3+....
You misunderstood. If you have [math]k[/math] symbols on the screen, you wait for [math]k[/math] seconds. Then you put another symbol after the old ones, so that you have [math]k + 1[/math] symbols, and you wait for [math]k + 1[/math] seconds.

>It does not matter how many times you call your print function, or what is the argument, your program will always have - 1/12 as output
Nope. You can't have [math]-\frac{1}{12}[/math] symbols on the screen. Nor is the program even designed to erase existing symbols -- Only to add new ones.

But I just realized that the program still wouldn't work, because the next wait time would still need to be stored in memory.

This. Mathematicians are 1/12 of a second faster than OP starting the program.

Vedä vittus

i was about to run the program but the numbers appeared on my screen before i compiled it