Jeans went to Trinity College Cambridge in October 1896 having won a mathematical scholarship. There he was a fellow student with G H Hardy who was in the same year. He was taught as an undergraduate at Cambridge by J W L Glaisher, W W Rouse Ball, A N Whitehead, R A Herman and E T Whittaker. He was Second Wrangler in the Mathematical Tripos examinations of 1898 (ranked seconf in the list of First Class students) and was awarded a First Class degree in the Mathematical Tripos of 1900. Although he would not return again to pure mathematics, Jeans wrote a paper on the theory of numbers while an undergraduate. Both Jeans and Hardy were awarded a Smith's prize with 'unspecified relative merit'. Jeans was awarded an Isaac Newton Studentship in astronomy and optics, then in 1901 he was elected a Fellow of Trinity.