Abdullah bin Amr bin As reported,

The Messenger of Allah ﷺ said to him, "Fast one day, and you will have the reward of all the rest."He replied, "I am able to do more than that."He said, "Fast two days, and you will have the reward of all the rest."He replied, "I am able to do more than that."He said, "Fast three days, and you will have the reward of all the rest."He replied, "I am able to do more than that."He said, "Fast four days, and you will have the reward of all the rest."He replied, "I am able to do more than that."He said, "Then fast the best of fasts in the sight of Allah, the fast of Dawud عليه السلام. He used to fast one day and break his fast the next."

Azami 4469

Sahih

عن عبد الله بن عمرو بن العاص قال

إن رسول الله ﷺ قال له: صم يوما ولك أجر ما بقي قال: أني أطيق أكثر من ذلك. قال: صم يومين، ولك أجر ما بقي قال: إني أطيق أكثر من ذلك. قال: صم ثلاثة أيام ولك أجر ما بقي قال: إني أطيق أكثر من ذلك. قال: صم أربعة أيام، ولك أجر ما بقي قال: إني أطيق أكثر من ذلك. قال: صم أفضل الصيام عند الله صوم داود عليه السلام، كان يصوم يوما ويفطر يوما.

الأعظمي 4469صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Voluntary fasting and encouragement to do it
Section
Most virtuous fasting is the fasting of Dawud عليه السلام
Numbering
Jami al-Kamil 4469 (2nd edition)
Azami 4469