Insert all lucas numbers below max to the set a and b are first two elements of the Lucas sequence
unordered_set < int > s ; int a = 2 , b = 1 , c ; s . insert ( a ) ; s . insert ( b ) ; while ( b < max ) { int c = a + b ; a = b ; b = c ; s . insert ( b ) ; } int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) {