Count Good Meals

A good meal is a pair of food items whose deliciousness sum is a positive power of two. Given an array deliciousness, count the number of pairs (i, j) with i < j such that deliciousness[i] + deliciousness[j] is a positive power of two. Return the result modulo 10^9 + 7. Zero is a valid item value, but zero is not a power of two, so a pair of zero-valued items is not good.

Examples
Input: [1,3,5,7,9]
Output: 4
Hints

Count Good Meals

A good meal is a pair of food items whose deliciousness sum is a positive power of two. Given an array deliciousness, count the number of pairs (i, j) with i < j such that deliciousness[i] + deliciousness[j] is a positive power of two. Return the result modulo 10^9 + 7. Zero is a valid item value, but zero is not a power of two, so a pair of zero-valued items is not good.