The story of Bodhisattva Learned Youth appears in the Sutra of the Buddha's Marvelous Deeds in Previous Lifetimes, the Sutra of Collected Birth Stories concerning the Practice of the Six Paramitas, and other works. Details differ slightly from one source to another.
According to the Sutra of the Buddha's Marvelous Deeds in Previous Lifetimes, Learned Youth happened to hear that a Buddha named Fixed Light (Skt Dipamkara, also known as Burning Torch) was in the world.
Rejoicing, he set out for the country where the Buddha lived. At length he reached a village where he met five hundred religious practitioners and he expounded a teaching to them. They were delighted to receive this teaching, and each gave him one silver coin when he left the village.
Then he went to a city that was decorated as though for a festival, and was told that the Buddha would soon arrive there. In the street, he passed a woman named Gopi who was carrying seven lotus blossoms. So eager was Learned Youth to make an offering to the Buddha that he offered her his five hundred silver coins in exchange for just five blossoms.
On learning that he wanted them as an offering to the Buddha, she was deeply moved and asked him to make her his wife in their next existence. She also gave him her remaining two lotus blossoms. When Fixed Light Buddha reached the city, the king and his ministers all bowed and reverently threw flowers before him as an offering. The flowers fell down to the ground.
The five lotus blossoms offered by Learned Youth remained floating in the air, however, and the other two lotus flowers given to Learned Youth by Gopicame to rest on the Buddha's shoulders. Fixed Light Buddha then perceived the sincere faith of Learned Youth and Gopi, and predicted that Learned Youth would in the distant future attain enlightenment as Shakyamuni Buddha.