On a difference equation arising in a learning-theory model