Variables are names for values. (SWC)
Nel programmare quasi sempre le 2 cose si identificano, ma non c'e' niente di male.
Why do indexes in C start from 0? Because they're offsets. There is no offset from the beginning to the first element.
Define f by
f(0) = 0
f(1) = 1
f(2n) = f(n)
f(2n+1) = f(n) + f(n+1).
Then f(n)/f(n+1) generates every positive rational exactly once.
f(2) = f(2*1) | = f(1) | = 1 | ||
f(3) = f(2*1+1) | = f(1) + f(1+1) | = 1+1 | = 2 | |
f(4) = f(2*2) | = f(2) | = 2 | ||
f(5) = f(2*2+1) | = f(2) + f(2+1) | = 1 + 2 | = 3 | |
f(6) = f(2*3) | = f(3) | = 2 | ||
f(7) = f(2*3+1) | = f(3) + f(3+1) | = 2 + 2 | = 4 |