# Проект Эйлера. Условия задач 61-70 на английском языке

Задачи проекта Эйлера 61-70

Список всех задач

1. Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae:

 Triangle P3,n=n(n+1)/2 1, 3, 6, 10, 15, ... Square P4,n=n2 1, 4, 9, 16, 25, ... Pentagonal P5,n=n(3n-1)/2 1, 5, 12, 22, 35, ... Hexagonal P6,n=n(2n-1) 1, 6, 15, 28, 45, ... Heptagonal P7,n=n(5n-3)/2 1, 7, 18, 34, 55, ... Octagonal P8,n=n(3n-2) 1, 8, 21, 40, 65, ...

The ordered set of three 4-digit numbers: 8128, 2882, 8281, has three interesting properties.

1. The set is cyclic, in that the last two digits of each number is the first two digits of the next number (including the last number with the first).
2. Each polygonal type: triangle (P3,127=8128), square (P4,91=8281), and pentagonal (P5,44=2882), is represented by a different number in the set.
3. This is the only set of 4-digit numbers with this property.

Find the sum of the only ordered set of six cyclic 4-digit numbers for which each polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different number in the set.

2. The cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube.

Find the smallest cube for which exactly five permutations of its digits are cube.

3. The 5-digit number, 16807=75, is also a fifth power. Similarly, the 9-digit number, 134217728=89, is a ninth power.

How many n-digit positive integers exist which are also an nth power?

4. All square roots are periodic when written as continued fractions and can be written in the form: The process can be summarised as follows:

 a0 = 4, $\frac{1}{\sqrt{23}-4}$ = $\frac{\sqrt{23}+4}{7}$ = 1 + $\frac{\sqrt{23}-3}{7}$ a1 = 1, $\frac{1}{\sqrt{23}-3}$ = $7\frac{\sqrt{23}+3}{14}$ = 3 + $\frac{\sqrt{23}-3}{2}$ a2 = 3, $\frac{1}{\sqrt{23}-3}$ = $2\frac{\sqrt{23}+3}{14}$ = 1 + $\frac{\sqrt{23}-4}{7}$ a3 = 1, $\frac{1}{\sqrt{23}-4}$ = $7\frac{\sqrt{23}+4}{7}$ = 8 + $\sqrt{23}-4$ a4 = 8, $\frac{1}{\sqrt{23}-4}$ = $\frac{\sqrt{23}+4}{7}$ = 1 + $\frac{\sqrt{23}-3}{7}$ a5 = 1, $\frac{1}{\sqrt{23}-3}$ = $7\frac{\sqrt{23}+3}{14}$ = 3 + $\frac{\sqrt{23}-3}{2}$ a6 = 3, $\frac{1}{\sqrt{23}-3}$ = $2\frac{\sqrt{23}+3}{14}$ = 1 + $\frac{\sqrt{23}-4}{7}$ a7 = 1, $\frac{1}{\sqrt{23}-4}$ = $7\frac{\sqrt{23}+4}{7}$ = 8 + $\sqrt{23}-3$

It can be seen that the sequence is repeating. For conciseness, we use the notation $\sqrt{23}$ = [4;(1,3,1,8)], to indicate that the block (1,3,1,8) repeats indefinitely.

The first ten continued fraction representations of (irrational) square roots are:

$\sqrt{2}$=[1;(2)], period=1
$\sqrt{3}$=[1;(1,2)], period=2
$\sqrt{5}$=[2;(4)], period=1
$\sqrt{6}$=[2;(2,4)], period=2
$\sqrt{7}$=[2;(1,1,1,4)], period=4
$\sqrt{8}$=[2;(1,4)], period=2
$\sqrt{10}$=[3;(6)], period=1
$\sqrt{11}$=[3;(3,6)], period=2
$\sqrt{12}$= [3;(2,6)], period=2
$\sqrt{13}$=[3;(1,1,1,1,6)], period=5

Exactly four continued fractions, for N $\leq$13, have an odd period.

How many continued fractions for N $\leq$ 10000 have an odd period?

5. Hence the sequence of the first ten convergents for $\sqrt{2}$ are:
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, ...

What is most surprising is that the important mathematical constant,
e = [2; 1,2,1, 1,4,1, 1,6,1 , ... , 1,2k,1, ...].

The first ten terms in the sequence of convergents for e are:

2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, ...

The sum of digits in the numerator of the 10th convergent is 1+4+5+7=17.

Find the sum of digits in the numerator of the 100th convergent of the continued fraction for e.

6. Consider quadratic Diophantine equations of the form:

x2 – Dy2 = 1

For example, when D=13, the minimal solution in x is 6492 – 13$\cdot$ 1802 = 1.

It can be assumed that there are no solutions in positive integers when D is square.

By finding minimal solutions in x for D = {2, 3, 5, 6, 7}, we obtain the following:

32 – 2$\cdot$22 = 1
22 – 3$\cdot$12 = 1
92 – 5$\cdot$42 = 1
52 – 6$\cdot$22 = 1
82 – 7$\cdot$32 = 1

Hence, by considering minimal solutions in x for D $\leq$ 7, the largest x is obtained when D=5.

Find the value of D $\leq$ 1000 in minimal solutions of x for which the largest value of x is obtained.

7. By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. That is, 3 + 7 + 4 + 9 = 23.

Find the maximum total from top to bottom in triangle.txt (right click and 'Save Link/Target As...'), a 15K text file containing a triangle with one-hundred rows.

NOTE: This is a much more difficult version of Problem 18. It is not possible to try every route to solve this problem, as there are 299 altogether! If you could check one trillion (1012) routes every second it would take over twenty billion years to check them all. There is an efficient algorithm to solve it. ;o)

8. Consider the following "magic" 3-gon ring, filled with the numbers 1 to 6, and each line adding to nine. Working clockwise, and starting from the group of three with the numerically lowest external node (4,3,2 in this example), each solution can be described uniquely. For example, the above solution can be described by the set: 4,3,2; 6,2,1; 5,1,3.

It is possible to complete the ring with four different totals: 9, 10, 11, and 12. There are eight solutions in total.

 Total Solution Set 9 4,2,3; 5,3,1; 6,1,2 9 4,3,2; 6,2,1; 5,1,3 10 2,3,5; 4,5,1; 6,1,3 10 2,5,3; 6,3,1; 4,1,5 11 1,4,6; 3,6,2; 5,2,4 11 1,6,4; 5,4,2; 3,2,6 12 1,5,6; 2,6,4; 3,4,5 12 1,6,5; 3,5,4; 2,4,6

By concatenating each group it is possible to form 9-digit strings; the maximum string for a 3-gon ring is 432621513.

Using the numbers 1 to 10, and depending on arrangements, it is possible to form 16- and 17-digit strings. What is the maximum 16-digit string for a "magic" 5-gon ring? 9. Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the number of numbers less than n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6.

 n Relatively Prime φ(n) n/φ(n) 2 1 1 2 3 1,2 2 1.5 4 1,3 2 2 5 1,2,3,4 4 1.25 6 1,5 2 3 7 1,2,3,4,5,6 6 1.1666... 8 1,3,5,7 4 2 9 1,2,4,5,7,8 6 1.5 10 1,3,7,9 4 2.5

It can be seen that n=6 produces a maximum n/φ(n) for n $\leq$ 10.

Find the value of n $\leq$ 1,000,000 for which n/φ(n) is a maximum.

10. Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, φ(9)=6.
The number 1 is considered to be relatively prime to every positive number, so φ(1)=1.

Interestingly, φ(87109)=79180, and it can be seen that 87109 is a permutation of 79180.

Find the value of n, 1 < n < 107, for which φ(n) is a permutation of n and the ratio n/φ(n) produces a minimum.