← RoseCode

ROSECODE 515

Binary sequences

Philippe_57721 · Math ·

Let F(m,n,r,s) be the number of binary sequences containing:
  • m times the digit '0'
  • n times the digit '1'
  • r times the sequence '00'
  • s times the sequence '11'
For instance, F(4,5,2,3) == 24 :
  • 0 0 0 1 0 1 1 1 1
  • 0 0 0 1 1 0 1 1 1
  • 0 0 0 1 1 1 0 1 1
  • 0 0 0 1 1 1 1 0 1
  • 0 0 1 0 0 1 1 1 1
  • 0 0 1 1 0 0 1 1 1
  • 0 0 1 1 1 0 0 1 1
  • 0 0 1 1 1 1 0 0 1
  • 0 1 0 0 0 1 1 1 1
  • 0 1 1 0 0 0 1 1 1
  • 0 1 1 1 0 0 0 1 1
  • 0 1 1 1 1 0 0 0 1
  • 1 0 0 0 1 1 1 1 0
  • 1 0 0 1 1 1 1 0 0
  • 1 0 1 1 1 1 0 0 0
  • 1 1 0 0 0 1 1 1 0
  • 1 1 0 0 1 1 1 0 0
  • 1 1 0 1 1 1 0 0 0
  • 1 1 1 0 0 0 1 1 0
  • 1 1 1 0 0 1 1 0 0
  • 1 1 1 0 1 1 0 0 0
  • 1 1 1 1 0 0 0 1 0
  • 1 1 1 1 0 0 1 0 0
  • 1 1 1 1 0 1 0 0 0

What is F(777,555,333,111)?

Answer format: the last 10 digits before the trailing 0 of this large number.

You are given 7741694224 for F(77,55,33,11)