Consider the increasing sequence 1,2,4,5,7,9,10,12,14,16,17,19,… of positive integers, obtained by concatenating alternating blocks {1},{2,4},{5,7,9},{10,12,14,16},… of odd and even numbers. Each block contains one more element than the previous one and the first element in each block is one more than the last element of the previous one. Prove that the n-th element of the sequence is given by 2n−⌊21+8n−7⌋.
(Here ⌊x⌋ denotes the greatest integer less than or equal to x.) floor functionmodular arithmeticalgebra unsolvedalgebra