To celebrate the tenth anniversary of The Melancholy of Haruhi Suzumiya franchise, Kadokawa published the second artbook by Noizi Ito, Haruhi Hyakka (ハルヒ百花 Haruhi Many Kinds of Flowers). This included Random Numbers.
It is January 3, and the SOS Brigade are doing the first shrine visit of the year. The girls go to Tsuruya's manor to borrow kimonos to wear, then meet up with the boys at the station. Tsuruya is unable to come herself because she is taking a trip to Europe, but asks for a photo of the girls in the kimonos.
On the walk to the shrine, Itsuki Koizumi, bitter over not being brought along on the time travel trip the day before (when Kyon went to rescue his previous self, as recounted in the prologue of The Intrigues of Haruhi Suzumiya) mutters the number 775,249 to Kyon. He says it is the product of three prime numbers, two of them with two digits and one with three digits, and challenges Kyon to guess the prime numbers before they leave the shrine. Kyon mentions his ongoing grievance about always having to pay for the SOS Brigade's activities due to his always arriving last, and Koizumi reveals he has experimented in lingering back before SOS Brigade meetings and still inevitably arrives before Kyon, suggesting that the reason Kyon always arrives last is because it is Haruhi Suzumiya's subconscious wish that he do so.
The shrine is packed with people due to it being the beginning of the year. The SOS Brigade do traditional shrine activities. Kyon and Haruhi get separated from the rest of the Brigade, and the strap on one of her sandals breaks while they are on the main shrine thruway. Kyon catches her before she falls and helps her to the side of the path. He calls Koizumi, hoping to get the rest of the Brigade to carry Haruhi. However, the others have already left the shrine, and Koizumi points out that there is no sense in working their way back through the crowd just to help Haruhi walk when Kyon is already right there and can do it himself.
A three-legged walk would be too slow (prolonging their public humiliation), Kyon is unwilling to carry Haruhi "princess style" due to the perceived romantic connotation, and a piggyback ride would require Haruhi to hike up her kimono (exposing an excessive amount of her legs), so Kyon carries Haruhi out of the shrine on his back. They regroup with the rest of the Brigade. Koizumi says after the phone call, Yuki Nagato informed him she could repair the broken sandal.
Haruhi proposes that Kyon and Koizumi should dress in hakama. Since Kyon doesn't own a hakama, Koizumi says he knows someone who runs a clothing rental shop. (Kyon assumes this to be a member of The Agency.) Haruhi uses the occasion as an excuse to demand to know the two boys' heights, weights, and waist sizes. Kyon is unbothered at giving out the information, but Koizumi insists on telling Haruhi in private. Kyon realizes that the three prime numbers must be Koizumi's clothing measurements.
A few days later, Kyon gets an envelope from Koizumi containing two photos. One is of the SOS Brigade in their kimonos and rented clothes, as promised to Tsuruya. The other is a secretly taken cell phone photo of Kyon carrying Haruhi. Kyon interprets this photo as his prize for guessing the three prime numbers.