Check if n is divisible by 3
if ( n % 3 == 0 ) { List < int > div_by_3 = find_sequence ( n / 3 ) ; if ( div_by_3 [ 0 ] < ans [ 0 ] ) { ans . Clear ( ) ; ans . Add ( div_by_3 [ 0 ] + 1 ) ; ans . Add ( n / 3 ) ; } }