A code sequence generation method for generating a Matched Spectral Null (MSN) code sequence where a null point of a frequency spectrum on a recording channel or communication channel of a code sequence is matched with a null point of a frequency spectrum of a Partial Response (PR) equalized signal including said code sequence, said code sequence generation method comprising:
- a state transition diagram analyzing step of dividing each state corresponding to a finite state transition diagram, where a value d (d:
- an integer greater or equal to 1) of minimum run of said MSN code sequence is restricted and a value of Alternating Digital Sum (ADS) of said code sequence on a Not Return to Zero Inverse (NRZI) method is also restricted into d+1 states in based on a preceding code sequence that is comprised of d codes output immediately before, and restricting transition to a next state in accordance with said preceding code sequence to form a finite division state transition diagram where output of codes on the transition to said next state is restricted;
- and
- a code sequence generation step of generating, in accordance with said finite division state transition diagram, a MSN code sequence where output of consecutive codes of “1” on said NRZI method is prohibited and a minimum run is limited to be greater or equal to one.