Hofstadter butterflies in magnetically modulated graphene bilayer: An algebraic approach