This year I will consume 52 more books than I usually read or listen to a year; in other words, **52 books**. Knowing myself, almost all books will be non-fiction, and that is OK.

I will also design, code and **publish a mobile application**.

```
[X] Contact, Carl Sagan, 1985
[X] Bad Blood, John Carreyrou, 2018
[X] Educated, Tara Westover, 2018
[X] Skunk Works, Ben Rich, Leo Janos, 1994
[X] Siddhartha, Hermann Hesse, 1922
[ ] Heavy, Kiese Laymon, 2018
```

`[ ] Mobile Application`

The 22th Project Euler problem - Names Scores - is stated as follows.

Using names.txt, a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score.

For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 × 53 = 49714.

What is the total of all the name scores in the file? — Project Euler, Names Scores, Problem 22

```
const fs = require('fs');
// Read the textfile into a string.
const names = fs.readFileSync('p022_names.txt', 'utf8')
// Split the string on every comma and remove the quotes
.split(',').map(name => name.replace(/"/g, ''))
// Sort the names.
.sort();
// Get the alphabetical value by adding the chars position in
// the alphabet. A = Char Code 65 = Alphabet Position 1.
const getAlphabeticalValue = name => name.split('')
.reduce((memo, item) => memo + item.charCodeAt(0) - 64, 0);
const result = names.reduce((memo, item, index) =>
memo + getAlphabeticalValue(item) * (index + 1), 0);
```

The 21th Project Euler problem - Amicable Numbers - is stated as follows. Evaluate the sum of all the amicable numbers under 10000.

```
const getProperDivisors = (n) => {
const divisors = [];
const root = Math.floor(Math.sqrt(n));
for (let i = 1; i <= root; i++) {
if (n % i === 0) {
divisors.push(i);
if (Math.pow(i, 2) !== n) {
divisors.push(n / i);
}
}
}
return divisors.sort(function (a, b) {
return a - b;
}).filter(x => x !== n);
};
// Let d(n) be defined as the sum of proper divisors of
// n (numbers less than n which divide evenly into n).
const d = (n) => {
const divisors = getProperDivisors(n);
return divisors.reduce((a,b) => a + b, 0);
};
// Iterate over all numbers from 0 to 9999.
const result = Array.from({length: 9999}).map((_, n) => {
const a = d(n);
const b = d(a);
// If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable
// pair and each of a and b are called amicable numbers.
return n !== a && n === b ? a : 0;
}).reduce((a,b) => a + b);
```

The 20th Project Euler problem - Factorial Digit Sum - is stated as follows. Find the sum of the digits in the number 100!

```
// Recursive function using BigInt to get n factorial.
const factorial = (n) => n <= 1 ? BigInt(n) : BigInt(n) * BigInt(factorial(--n));
// Convert the number to a string.
const sumDigits = n => n.toString()
// Split the string on every char.
.split('')
// Convert all chars to ints.
.map(x => parseInt(x))
// Sum all ints.
.reduce((a,b) => a + b);
// Get 100 factorial.
const f100 = factorial(100);
// Sum the digits.
const result = sumDigits(f100);
```

The 19th Project Euler problem - Counting Sundays - is stated as follows. How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?

```
// Get all the months between Jan 1901 to Dec 2000.
// We add 12 since we want the months in 2000 as well.
const months = (2000 - 1901) * 12 + 12;
// Iterate one month at a time.
const sundays = Array.from({length:months})
.filter((_,month) => {
const currentYear = 1901 + Math.floor(month/12);
const currentMonth = month % 12;
// Check the weekday of the 1 in the current year and month.
// 0 equals Sunday.
return new Date(currentYear, currentMonth, 1).getDay() === 0
}).length;
```

- Project Euler 20 - Factorial Digit Sum - Solved with JavaScript
- Project Euler 19 - Counting Sundays - Solved with JavaScript
- Project Euler 18 & 67 - Maximum Path Sum - Solved with JavaScript
- Project Euler 1 - Multiples of 3 or 5 - Solved with Matlab
- Project Euler 3 - Largest Prime Factor - Solved with C#
- Project Euler 2 - Even Fibonacci Numbers - Solved with C#
- Project Euler 1 - Multiples of 3 or 5 - Solved with C#
- Project Euler 2 - Even Fibonacci Numbers - Solved with F#
- Project Euler 1 - Multiples of 3 or 5 - Solved with F#
- RoboRackers™ - Riddle by FiveThirtyEight - Solved with Javacript
- Project Euler Problem 17 - Number Letter Counts - solved with R
- Project Euler Problem 16 - Power Digit Sum - solved with Javascript
- Project Euler Problem 15 - Lattice Paths - solved with R
- Finding the 10001st prime with R
- Find longest Collatz sequence using Javascript
- Sum large numbers with Kotlin versus Javascript
- What is a binary tree and how to invert it using Kotlin
- Find Highly Divisible Triangular Numbers with Kotlin
- Find the Largest Product in a Grid with Rust
- Summation of the First Two Million Primes with Rust
- Finding the largest product in a series with Rust
- Finding the 10001st prime with Rust
- The complete list of rational numbers with Stern-Brocot and Javascript
- Smallest positive number that is evenly divisible by all of the numbers from 1 to 20 with Rust
- Find the difference between the square of the sum and the sum of the squares for the first hundred numbers
- Finding the largest palindrome product with Rust
- Project Euler 3 - Largest Prime Factor - Solved with Reason
- Project Euler 2 - Even Fibonacci Numbers - Solved with Ocaml
- Project Euler 1 - Multiples of 3 or 5 - Solved with Ocaml
- Special Pythagorean Triplet solved with Reason
- New Year's Resolution 2018