2 Samuel says God incited David against Israel and told him to take a census. (Which God afterward decided was somehow a bad thing for David to have done.)
But then when the same story is retold in 1 Chronicles, this version of the story blames it on Satan. It says Satan incited David to take a census of Israel.
Possible explanation
God and Satan have the same goals, and are working together.

