MathDB
Explicit formula for this sequence

Source: South African MO 2005 Q6

May 27, 2012
floor functionmodular arithmeticalgebra unsolvedalgebra

Problem Statement

Consider the increasing sequence 1,2,4,5,7,9,10,12,14,16,17,19,1,2,4,5,7,9,10,12,14,16,17,19,\dots of positive integers, obtained by concatenating alternating blocks {1},{2,4},{5,7,9},{10,12,14,16},\{1\},\{2,4\},\{5,7,9\},\{10,12,14,16\},\dots 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 nn-th element of the sequence is given by 2n1+8n72.2n-\Big\lfloor\frac{1+\sqrt{8n-7}}{2}\Big\rfloor. (Here x\lfloor x\rfloor denotes the greatest integer less than or equal to xx.)