Is there a phrase that Japanese people use to express amusement when seeing each other unexpectedly? For example, if you just said goodbye and then ran into each other somewhere else?
A common word for this is 奇遇【きぐう】 (not to be confused with 奇偶: oddness and evenness (of numbers)). 奇遇ですね is an idiomatic phrase worth memorizing as-is.
- こんなところで会うとは奇遇ですね。 What a coincidence to meet you here!
- 君も北海道生まれか、奇遇だね。 Oh, you were born in Hokkaido, too? What a coincidence.
But if you just said goodbye and then ran into each other soon after that, you can't use this phrase. (Can you say "fancy meeting you here" in that situation?)
If I meet someone in an unexpected place in an unexpected time, I would say;
これは、これは - wow, Jesus!
(こんな場所でお会いするとは)これはまた、奇遇(偶然)ですね - It's really coincidence (to meet you in such a place)
おや（あら）、まあ - Oh My God!
おや（あら）、お珍しい - Wow. I'm surprised (to meet you in such place).
いや、懐かしい(casual), Dear! Long time no see.
お懐かしゅうございます - Ditto, but polite, or said to senior).
If I ran into someone whom I just said “Goodbye” somewhere else, I would say;
おや、また会い(お会いし)ましたね。- Oh. We saw again.
Probably most commonly heard is あらまあ (shortened to あら). Although it rather expresses surprise, it fits into the scenario: