番目に～　versus　番目の～


While reading
[this](https://japanese.stackexchange.com/questions/13009/%E4%BA%8C%E7%95%AA-
vs-%E4%BA%8C%E7%95%AA%E7%9B%AE-confusion) question I could not explain myself
why に is used rather の after ～番{ばん}目{め} in the following sentences.

>   * 「それは、二{に}番目に高{たか}い建{たて}物{もの}です。」
>   * 「四{よん}番目に速{はや}い人{ひと}は、田{た}中{なか}さんです。」
>

I checked
[goo](http://dictionary.goo.ne.jp/leaf/jn2/182084/m0u/%E7%95%AA%E7%9B%AE/)
dictionary about 番目 and the sole example with に (1番目と2番目に分{わ}けられる) is fine
because the に is there because of 分けられる.

Is there a reason that explain why に follows 番目? What confuse me even more is
that 番目 is not a 形{けい}容{よう}動{どう}詞{し} so I can't see any reason explaining に
rather than の.




It is because X番目に is an adverb, and X番目の behaves like an adjective.

Because you can't have an adjective to describe another adjective, X番目に is
needed to order objects based on a quality given by an adjective.

Thus, in your example, 「二番目に高い建物です」, に is needed because you are ranking the
buildings based on the adjective 高い.

On the other hand, の is used if you aren't ordering the objects based on a
stated adjective. For example:

> 週の2番目の日は月曜日だ - The second day of the week is Monday.  
>  三番目の子供が生まれた - The third child was born.

The days of the week or order of the children aren't being ordered by any
quality here. They're just in the implied order.

Also, even if some adjective is implied in the definition of a noun, you still
should use の because it is still modifying only a noun and not an adjective.
The following sentence is perfectly valid:

> 大阪は日本で2番目の大都市だ - Osaka is the second largest city in Japan.

But:

> 大阪は日本で2番目に大きい都市だ - Osaka is the second largest city in Japan.




It is because X番目に is an adverb, and X番目の behaves like an adjective.

Because you can't have an adjective to describe another adjective, X番目に is
needed to order objects based on a quality given by an adjective.

Thus, in your example, 「二番目に高い建物です」, に is needed because you are ranking the
buildings based on the adjective 高い.

On the other hand, の is used if you aren't ordering the objects based on a
stated adjective. For example:

> 週の2番目の日は月曜日だ - The second day of the week is Monday.  
>  三番目の子供が生まれた - The third child was born.

The days of the week or order of the children aren't being ordered by any
quality here. They're just in the implied order.

Also, even if some adjective is implied in the definition of a noun, you still
should use の because it is still modifying only a noun and not an adjective.
The following sentence is perfectly valid:

> 大阪は日本で2番目の大都市だ - Osaka is the second largest city in Japan.

But:

> 大阪は日本で2番目に大きい都市だ - Osaka is the second largest city in Japan.

