Let
![p](/media/m/1/c/8/1c85c88d10b11745150467bf9935f7de.png)
and
![q](/media/m/c/1/d/c1db9b1124cc69b01f9a33595637de69.png)
be relatively prime positive integers. A subset
![S](/media/m/c/6/3/c63593c3ec0773fa38c2659e08119a75.png)
of
![\{0, 1, 2, \ldots \}](/media/m/2/e/c/2ecbbf7c223d66c51ff400e22892da34.png)
is called ideal if
![0 \in S](/media/m/7/9/4/79420c2a5fc104dca33db001f66f7693.png)
and for each element
![n \in S,](/media/m/1/7/5/1751809b608fc62085ed036164a0382d.png)
the integers
![n + p](/media/m/9/4/4/944a82ff1f1d8e92ae3a8fb623849f17.png)
and
![n + q](/media/m/9/f/f/9ffd59388b94c2443d476718463bdc91.png)
belong to
![S.](/media/m/3/7/7/3772accbdc4fffed2efa17d53f141907.png)
Determine the number of ideal subsets of
%V0
Let $p$ and $q$ be relatively prime positive integers. A subset $S$ of $\{0, 1, 2, \ldots \}$ is called ideal if $0 \in S$ and for each element $n \in S,$ the integers $n + p$ and $n + q$ belong to $S.$ Determine the number of ideal subsets of $\{0, 1, 2, \ldots \}.$