What is an expression that means "of course!" as if suddenly realizing something?


I know that もちろん is often used to mean something like "of course (you may)" or
even "naturally, ..." However, what would an equivalent expression be for "of
course!", used as an interjection as a result of sudden realization or
comprehension? For some reason, もちろん doesn't seem right, and I don't believe
I've ever heard or seen it used in this context.




I think the following come closest

  * when you realize something you didn't anticipate (or at least you pretend not to have anticipated, e.g. when you are being polite):

> (あぁ) そっか  
>  Of course! I never noticed!

  * when you had confirmed something you _did_ anticipate:

> やっぱりね  
>  Of course! I knew it!




I think the following come closest

  * when you realize something you didn't anticipate (or at least you pretend not to have anticipated, e.g. when you are being polite):

> (あぁ) そっか  
>  Of course! I never noticed!

  * when you had confirmed something you _did_ anticipate:

> やっぱりね  
>  Of course! I knew it!

