Count number of sub-sequences with GCD 1
Given an array of N numbers, the task is to count the number of subsequences that have gcd equal to 1. Examples: Input: a[] = {3, 4, 8, 16} Output: 7 The subsequences are: {3, 4}, {3, 8}, {3, 16}, {3, 4, 8}, {3, 4, 16}, {3, 8, 16}, {3, 4, 8, 16} Input: a[] = {1, 2, 4} Output: 4 A simple solution is