No of ways of selecting k non adjacent nodes in a graph for all k

Suppose there is an undirected connected graph with n<=38 nodes without multiple edges and self loops . We have to find the no. Of ways to select k nodes such that no two of them are adjacent for all possible k efficiently