by accident vs serendipitously

by accident

adv
  • By chance; unexpectedly; as the result of an unrelated series of events. 

  • As the result of some undesigned, unintended, unrelated, natural, or random occurrence; as the unexpected and unforeseen result of formerly unrelated factors. 

  • Accidentally; unintentionally; without meaning to; as the result of an event not expected, aided, or willingly planned. 

adj
  • Accidental; as the result of some unforeseen happening or series of events; unexpected; resulting from an event without the foresight, expectation, aid, or design of the person by whose agency it was caused; unintentional. 

serendipitously

adv
  • By serendipity; by blind luck in combination with wisdom; by fortunate accident. 

How often have the words by accident and serendipitously occurred in a corpus of books? (source: Google Ngram Viewer )