Implementing Function that Maps over Stream
Since streamMap allows you to map over a stream, you can as well define a Functor instance for Stream. Actually, streams can also define an Applicative instance which zips two streams and also a Monad instance whose join computes the diagonal of a 2-dimensional stream.
Your definition of Stream is slightly inefficient as it wraps the (,) constructor in another constructor Stream. You could:

make it a newtype, or
use the UNPACK pragma, or
define just a 2-argument constructor like data Stream a = Cons a (Stream a).

Your solution deviates from the assignment that forbids any kind of divisibility testing. Function odd tests for divisibility by 2 and g implements (somewhat inefficiently) division by 2.
Without the full code it's a bit hard to test/judge correctness, but I believe your implementation is not correct. In particular, I believe for n=6 your code will yield 3, while the expected value is 1.