0
$\begingroup$

enter image description here

What is the value that appears at each of the following positions in this sequence?

(a) 411 (b) 1000 (c) 1245

Source - Zonal Informatics Olympiad 2005 Question Paper

  • 2
    Golomb's sequence: http://oeis.org/A0014622012-10-30

1 Answers 1

1

Maple program:

 N:= 1245: A[1]:= 1: B[1]:= 1: A[2]:= 2:   for n from 2 while B[n-1] <= N do     B[n]:= B[n-1] + A[n];    for j from B[n-1]+1 to B[n] do A[j]:= n end do  end do:  A[411],A[1000],A[1245]; 

$ 50, 86, 98$