XY was mostly part of the series title, being the genetic notation for a male. It is not seen in the series, and is spoken only twice. "781227 becomes Kyle in the Pilot episode, becomes Kyle Trager as a foster child of Nicole and Stephen Trager, and is legally adopted in Season 2.
781227 was the code name for an experiment by Adam Baylin in prolonging human gestation. Adam himself had been the only successful test of that theory in earlier investigations. He had been created as an arranged embryo with thirteen months in a surrogate mother's womb, and consequently had extraordinary mental abilities. The hope was to create an advanced civilization.
There is no definitive information about the embryo used for 781227. There are two photos of Adam at the age of Kyle so that they are identical. However, there is no mention by Adam or others of cloning. There is a dubious claim, in the final moment of the final episode, that Kyle shares Grace Kingsley as genetic mother with Michael Cassidy.
Because Adam's mother had died when he was "extracted", he dedicated his student years and then his early career to developing an artificial womb. Adam "invented a fluid that would provide oxygen, and nourish the embryo placed inside. So, there was no need for a natural mother, and obviously, no umbilical cord. And, as a result, the child would not have a belly-button".
Adam had formed a company he called ZZYZX with backing from a consortium of scientists, "visionaries, great humanitarians", called the Latnok Society. We know of nothing that Zzyzx did other than the experiment. Two other key members were Brian Taylor and William Kern, both of whom had other ideas about the experiment. In order for Kern to use 781227 as a biocomputer, Adam is expelled from Zzyzx. We see an important characteristic of 781227 when its vital signs respond and it moves when Adam is being thrown out.
Years later, Kern is called by a technician about a problem with data processing by 781227. It will solve math problems instantly that "would take the most advanced mathematician two weeks to solve." However, "It won't process any of our strategic warfare phenomena. Almost like it's making judgement calls". Kern reports on the phone that "781227 is no longer cooperating." The technician calls Kern again to report "The whole memory matrix--the entire Zzyzx database, all of the research, everything we've ever done, or recorded - has been copied" by 781227.
Kern orders "Well, disconnect it, now! Begin termination protocols". Foss says "I won't let you do it, Kern!", He does manage to get the body out, and tries to get it breathing.
Foss puts 781227 in his vehicle outside in the woods; but Kern finds him and is going to shoot both 781227 and Foss. Foss wins.
Foss takes 781227 out of the vehicle, and has to revive it again. While he is dealing with the remains of Kern, 781227 succeeds in wandering off and sleeps in the woods until the next morning. That is where the series begins.
The number 781227 was a code for the entire project and those assigned to it. Foss loses his security card at the murder site, but did save Kern's along with other identifying items. We see both cards, one found by the police, the other turned in to Zzyzx when Foss resigns. When Kyle is desperate to know about his birthday, he finds the number on the Ouija board. The number is the name used by Cyrus Reynolds and Rebecca Thatcher at Zzyzx, and later by Julian Ballantine, when they discover Kyle is alive.