2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								id: 5900f4ab1000cf542c50ffbd
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								title: 'Problem 318: 2011 nines'
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								challengeType: 5
							 
						 
					
						
							
								
									
										
										
										
											2019-08-05 09:17:33 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								forumTopicId: 301974
							 
						 
					
						
							
								
									
										
										
										
											2021-01-13 03:31:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								dashedName: problem-318-2011-nines
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# --description--
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Consider the real number $\sqrt{2} + \sqrt{3}$.
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								When we calculate the even powers of $\sqrt{2} + \sqrt{3}$ we get:
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								$$\begin{align}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^2 = 9.898979485566356\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^4 = 97.98979485566356\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^6 = 969.998969071069263\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^8 = 9601.99989585502907\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^{10} = 95049.999989479221\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^{12} = 940897.9999989371855\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^{14} = 9313929.99999989263\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  &  {(\sqrt{2} + \sqrt{3})}^{16} = 92198401.99999998915\ldots \\\\
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								\end{align}$$
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								It looks like that the number of consecutive nines at the beginning of the fractional part of these powers is non-decreasing. In fact it can be proven that the fractional part of ${(\sqrt{2} + \sqrt{3})}^{2n}$ approaches 1 for large $n$.
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Consider all real numbers of the form $\sqrt{p} + \sqrt{q}$ with $p$ and $q$ positive integers and $p <  q$, such that the fractional part of ${(\sqrt{p} + \sqrt{q})}^{2n}$ approaches 1 for large $n$.
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Let $C(p,q,n)$ be the number of consecutive nines at the beginning of the fractional part of ${(\sqrt{p} + \sqrt{q})}^{2n}$.
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Let $N(p,q)$ be the minimal value of $n$ such that $C(p,q,n) ≥ 2011$.
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Find $\sum N(p,q)$ for $p + q ≤ 2011$.
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# --hints--
  
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								`twoThousandElevenNines()`  should return `709313889` . 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```js
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								assert.strictEqual(twoThousandElevenNines(), 709313889);
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# --seed--
  
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## --seed-contents--
  
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```js
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function twoThousandElevenNines() {
							 
						 
					
						
							
								
									
										
										
										
											2020-09-15 09:57:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  return true;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-21 17:59:56 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								twoThousandElevenNines();
							 
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-27 19:02:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# --solutions--
  
						 
					
						
							
								
									
										
										
										
											2018-09-30 23:01:58 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```js
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// solution required
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```