the ancient section of the samyutta-nikaya called sattavassani ( seven years ) , which deals with the period of ascetic practice , says that gotama remained in meditation four weeks before finally leaving the bodhi tree and that he spent a fifth week in meditation under the ajapala tree where he encountered and subdued a demon , mara , and determined to preach to others .