Hatthivagga

Suttapiṭaka · Khuddakanikāya · Therāpadāna (1) · Vol. 32 · Section 216

[216] Having seen the Teacher's rag-robe (paṃsukūla) caught upon a treetop, raising my joined palms in reverence, I paid homage to the rag-robe. In the thirty-first aeon from now, since I gained that perception (saññā) then, I know of no bad destination (duggati): this is the fruit of homage to the Buddha (buddhapūjā). In the twenty-fifth aeon from now, I was a lord of the people, Amitābha by name, a universal monarch (cakkavatti) of great power. The four analytic insights (paṭisambhidā), and also these eight liberations (vimokkha), the six superknowledges (abhiññā), have been realized; the Buddha's teaching has been fulfilled. It was thus, indeed, that the Venerable Elder Ekasaññaka spoke these verses. The Apadāna of the Elder Ekasaññaka is concluded. The Apadāna of the Elder Raṃsisaññaka, the Fifth (215)

English translation from the Pali (Siam Raṭṭha edition) — under review, not for citation.

This passage also appears in 2 other places