
Quellenangaben
In Cambridge hab ich eine schöne Serie von mjouk entdeckt. Diese Serie wurde inspiriert durch Project Euler.
Allgemeine Bemerkungen
Um die Project Euler Rätsel zu lösen, muss man vermutlich ein kleines Computerprogramm schreiben. Ich habe es mit VBA in Excel gemacht.
Das Rätsel
Eine 5 x 5 Spirale wird erstellt, indem man mit der 1 anfängt, nach rechts startet und den Wert immer um 1 erhöht:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
Bildet man hier die Summe der Zahlen der beiden Diagonalen erhält man 101.
Rätsel
Berechne die Summe der Zahlen der beiden Diagonalen einer 1001 x 1001 Spiral auf die gleiche Weise.
Berechne für diese Spirale jeweils das Produkt der Zahlen der beiden Diagonalen (NO->SW und NW->SO) separat.
f(j, Zahl) sei die j-te Stelle der gefragten Zahl (Summe, Produkt NW->SO, Produkt NO->SW)
Den Cache findest du bei:
- N
- f(366,Produkt NW->SO)
- f(7,Summe)
- f(1096,Produkt NO->SW)
- f(1023,Produkt NW->SO)
- f(1317,Produkt NO->SW)
- f(4,Summe)
- f(585,Produkt NO->SW)
- E
- f(74,Produkt NO->SW)
- f(8,Summe)
- f(1461,Produkt NW->SO)
- f(1680,Produkt NO->SW)
- f(1389,Produkt NW->SO)
- f(2,Summe)
- f(1534,Produkt NO->SW)
- f(877,Produkt NW->SO)

Acknowledgements
In Cambridge I found a nice series by mjouk. It was inspired by Project Euler.
General notes
To solve Project Euler puzzles, you will probably have to write a computer program.
The puzzle
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows:
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
It can be verified that the sum of the numbers on the diagonals is 101.
The puzzle
Calculate the sum of the numbers of the both diagonals in a 1001 by 1001 spiral formed in the same way.
Calcutale the product for each diagonal seperately (NW->SO and NO->SW) in a 1001 by 1001 spiral formed in the same way.
Define f(j, number) to be the jth digit of requested number (sum, product NW->SO, product NO->SW)
The cache can be found at
- N
- f(366,product NW->SO)
- f(7,sum)
- f(1096,product NO->SW)
- f(1023,product NW->SO)
- f(1317,product NO->SW)
- f(4,sum)
- f(585,product NO->SW)
- E
- f(74,product NO->SW)
- f(8,sum)
- f(1461,product NW->SO)
- f(1680,product NO->SW)
- f(1389,product NW->SO)
- f(2,sum)
- f(1534,product NO->SW)
- f(877,product NW->SO)