Just to give some context. What scrypt tries to do is to implement a sequential memory-hard function. The definition is:
a) can be computed by a memory-hard algorithm on a Random Access Machine in T(n) operations; and
b) cannot be computed on a Parallel Random Access Machine with S'(n) processors and S'(n) space in expected time T'(n) where S'(n)*T'(n) = O(T(n)^(2-x)) for any x>0.
where a memory-hard algorithm has the following properties:
A memory-hard algorithm on a Random Access Machine is an algorithm which uses S(n) space and T(n) operations, where S(n) ∈ Ω(T(n)^(1-eps))
From
www.tarsnap.com/scrypt/scrypt.pdf