data/problems/318.yml
---
:id: 318
:name: 2011 nines
:url: https://projecteuler.net/problem=318
:content: "Consider the real number √2+√3. \nWhen we calculate the even powers of
√2+√3 we get: \n(√2+√3)<sup>2</sup> = 9.898979485566356... \n(√2+√3)<sup>4</sup>
= 97.98979485566356... \n(√2+√3)<sup>6</sup> = 969.998969071069263... \n(√2+√3)<sup>8</sup>
= 9601.99989585502907... \n(√2+√3)<sup>10</sup> = 95049.999989479221... \n(√2+√3)<sup>12</sup>
= 940897.9999989371855... \n(√2+√3)<sup>14</sup> = 9313929.99999989263... \n(√2+√3)<sup>16</sup>
= 92198401.99999998915...\n\nIt looks like that the number of consecutive nines
at the beginning of the fractional part of these powers is non-decreasing. \nIn
fact it can be proven that the fractional part of (√2+√3)<sup>2n</sup> approaches
1 for large n.\n\nConsider all real numbers of the form √p+√q with p and q positive
integers and p\\<q, such that the fractional part of (√p+√q)<sup>2n</sup> approaches
1 for large n.\n\nLet C(p,q,n) be the number of consecutive nines at the beginning
of the fractional part of \n (√p+√q)<sup>2n</sup>.\n\nLet N(p,q) be the minimal
value of n such that C(p,q,n) ≥ 2011.\n\nFind ∑N(p,q) for p+q ≤ 2011.\n\n"