I'm wondering if it is possible to run a set of numbers ('target numbers') through a function and get out a number that when queried against in some way (with a 'target' number as all/part of the query) would return a true / false as to whether or not that number exists in the output of the function. Tough for me to verbalize so I'll show an example


say my list of numbers is
ListOfNumbers = [1,5,100,46736,3]


Can I run it through some function f(ListOfNumbers) = outputNumber 


So that I can then run another function f(queryNumber,outputNumber) = true/false


also, the outputNumber (or one of the functions) has to be such that if I did something like this..


f(46736,outputNumber) = true
but (23368,outputNumber) = false <-- it's a factor of 46736 but should not return true, only the numbers in the list return true.


Also, if it's not possible with one function, I wonder if it is possible with a couple different functions and if you get two or 'x' trues and no falses it is in the list. 



Derive unique denominators from number
I assume that you care about the members of the list and not their order or possible repeats.


Consider the function $f(S)=\sum\_{s \in S}2^s.$ That is in some sense the most efficient possible function which gives a unique output to every set of numbers. Every positive integer is a possible output.


The function $g(y,B)=\lfloor \frac{B}{2^y} \rfloor \bmod 2$ will output $1$ or $0$ according as $y \in S$ or $y \notin S$ for the unique set with $f(S)=B.$ Of course the formula given for $g(y,B)$ amounts to the $y$th bit of the binary expansion of $B.$


