With Udāyin
Udāyin Sutta  (AN 6:29)

Then the Blessed One addressed Ven. Udāyin, “Udāyin, how many bases for recollection1 are there?”

When this was said, Ven. Udāyin was silent.

A second time… A third time, the Blessed One addressed Ven. Udāyin, “Udāyin, how many bases for recollection are there?”

When this was said, Ven. Udāyin was silent a third time.

Then Ven. Ānanda said to Ven. Udāyin, “Friend Udāyin, the Blessed One addressed you.”

“I heard him, friend Ānanda.” Then to the Blessed One: “Lord, there is the case where a monk recollects his many past lives, i.e., one birth, two…: ‘There I had such a name, belonged to such a clan, had such an appearance. Such was my food, such my experience of pleasure & pain, such the end of my life. Passing away from that state, I re-arose there. There too I had such a name, belonged to such a clan, had such an appearance. Such was my food, such my experience of pleasure & pain, such the end of my life. Passing away from that state, I re-arose here.’ Thus he recollects his many past lives in their modes & details.

“This, lord, is a basis for recollection.”

Then the Blessed One addressed Ven. Ānanda, “I knew, Ānanda, that this worthless man doesn’t dwell devoted to the heightened mind.

“So, Ānanda, how many bases for recollection are there?”

“There are five bases for recollection, lord. Which five?

[1] “There is the case where a monk, quite secluded from sensuality, secluded from unskillful qualities, enters & remains in the first jhāna: rapture & pleasure born of seclusion, accompanied by directed thought & evaluation.

“With the stilling of directed thoughts & evaluations, he enters & remains in the second jhāna: rapture & pleasure born of concentration, unification of awareness free from directed thought & evaluation—internal assurance.

“With the fading of rapture, he remains equanimous, mindful, & alert, and senses pleasure with the body. He enters & remains in the third jhāna, of which the noble ones declare, ‘Equanimous & mindful, he has a pleasant abiding.’

“This basis for recollection, lord, thus developed, thus pursued, leads to a pleasant abiding in the here & now.

[2] “And further, the monk attends to the perception of light, determines on the perception of day, so that day is like night, night is like day. By means of an awareness thus open & unhampered, he develops a brightened mind.

“This basis for recollection, lord, thus developed, thus pursued, leads to the gaining of knowledge & vision.2

[3] “And further, the monk reflects on this very body from the soles of the feet on up, from the crown of the head on down, surrounded by skin and full of various kinds of unclean things: ‘In this body there are head hairs, body hairs, nails, teeth, skin, flesh, tendons, bones, bone marrow, kidneys, heart, liver, pleura, spleen, lungs, large intestines, small intestines, gorge, feces, bile, phlegm, pus, blood, sweat, fat, tears, skin-oil, saliva, mucus, fluid in the joints, urine.’

“This basis for recollection, lord, thus developed, thus pursued, leads to the abandoning of sensual passion.

[4] “And further, as if he were to see a corpse cast away in a charnel ground—one day, two days, three days dead—bloated, livid, & festering, the monk applies it to this very body, ‘This body, too: Such is its nature, such is its future, such its unavoidable fate.’

“Or, as if he were to see a corpse cast away in a charnel ground, being chewed by crows, being chewed by vultures, being chewed by hawks, being chewed by dogs, being chewed by hyenas, being chewed by various other creatures… a skeleton smeared with flesh & blood, connected with tendons… a fleshless skeleton smeared with blood, connected with tendons… a skeleton without flesh or blood, connected with tendons… bones detached from their tendons, scattered in all directions—here a hand bone, there a foot bone, here a shin bone, there a thigh bone, here a hip bone, there a back bone, here a rib, there a chest bone, here a shoulder bone, there a neck bone, here a jaw bone, there a tooth, here a skull… the bones whitened, somewhat like the color of shells… the bones piled up, more than a year old… the bones decomposed into a powder: He applies it to this very body, ‘This body, too: Such is its nature, such is its future, such its unavoidable fate.’

“This basis for recollection, lord, thus developed, thus pursued, leads to the uprooting of the conceit, ‘I am.’

[5] “And further, with the abandoning of pleasure & pain—as with the earlier disappearance of elation & distress—the monk enters & remains in the fourth jhāna: purity of equanimity & mindfulness, neither pleasure nor pain.

“This basis for recollection, lord, thus developed, thus pursued, leads to the penetration of many properties.3

“These, lord, are the five bases for recollection.”

“Excellent, Ānanda! Excellent! In that case, Ānanda, remember this sixth basis for recollection: There is the case where a monk is always mindful as he goes forward, always mindful as he goes back, always mindful as he stands, always mindful as he sits, always mindful as he lies down to sleep, always mindful as he determines on an action.

“This basis for recollection, Ānanda, thus developed, thus pursued, leads to mindfulness & alertness.”

Notes

1. Anussatiṭṭhāna. In other suttas, this term means the object or subject of recollection. Here, however, it’s applied to the four jhānas as well as to subjects of recollection. The Commentary doesn’t explain why.

2. Ñāṇa-dassana: such powers as clairvoyance, clairaudience, the ability to recollect previous lives, and the ability to read minds.

3. The fourth jhāna is mentioned separately from the first three jhānas here for at least two reasons. One is that it is an equanimous state, rather than a pleasant abiding, inasmuch both pleasure and pain are abandoned on entering it. Two, it is frequently mentioned as the basis for developing all of the direct knowledges—this is apparently what is meant by “the penetration of many properties” (aneka-dhātu-paṭivedha)—whereas the first three jhānas are not. See DN 2.

See also: DN 22; MN 125; MN 136; SN 51:20; SN 54:13; AN 8:70