Loading [MathJax]/extensions/TeX/mathchoice.js

Problem #343

Stringer

Given a string of length n made up of 5 characters a, b, c, d or e.

Let S(n) denote the number of strings of length n such that any of ab, ac, ad, eb, ec or ed doesn't occur as a substring in the string of size n.

Calculate \sum\limits_{i=1}^{10^{18}} S(i) \mod 1000000007

Contributed by SHUBHAM KUMAR VERMA

Solved by 41 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.