Split first N natural numbers into two subsequences with non | Function to split 1 to N into two subsequences with non - coprime sums ; Driver code
function printSubsequence ( N ) { document . write ( " " ) ; for ( let i = 1 ; i < N - 1 ; i ++ ) { document . write ( i + " " ) ; } document . write ( N - 1 + " " + " " ) ; document . write ( " " + N + " " + " " ) ; } let N = 8 ; printSubsequence ( N ) ;