The Number of Beautiful Subsets

Given an array of integers nums and an integer k, count the number of beautiful non-empty subsets. A subset is beautiful if no two elements in it have absolute difference equal to k.

Examples
Input: [[2,4,6],2]
Output: 4
Hints

The Number of Beautiful Subsets

Given an array of integers nums and an integer k, count the number of beautiful non-empty subsets. A subset is beautiful if no two elements in it have absolute difference equal to k.