The first two consecutive numbers to have two distinct prime factors are:

\[14 = 2 × 7\] \[15 = 3 × 5\]

The first three consecutive numbers to have three distinct prime factors are:

\[644 = 2^2 × 7 × 23\] \[645 = 3 × 5 × 43\] \[646 = 2 × 17 × 19\]

Find the first four consecutive integers to have four distinct prime factors each. What is the first of these numbers?

至少我以前做过2波欧拉,当然也是各种搁置。

主要和以前的代码相比,就是修改了下格式,偶尔加上一两句吐槽。

这里是以前在sina blog上面贴过的解答,主要发现在公司居然不能上sina blog,而且上面的代码格式太不堪入目了,所以有空就整理下。

偶尔看看自己以前写的代码也很有意思,特别是一些C的代码

It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.

\[9 = 7 + 2×1^2\] \[15 = 7 + 2×2^2\] \[21 = 3 + 2×3^2\] \[25 = 7 + 2×3^2\] \[27 = 19 + 2×2^2\] \[33 = 31 + 2×1^2\]

It turns out that the conjecture was false.

What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?

好久以前就开始玩欧拉刷题(>800天),但是显然我做题速度远远低于它出题速度

虽然我不觉得欧拉的好友有什么很大的用处,不过如果想加我好友的可以点

主要是鸡毛突然从我的好友名单里面消失了……

Triangle, pentagonal, and hexagonal numbers are generated by the following formulae:

Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, …

Pentagonal Pn=n(3n−1)/2 1, 5, 12, 22, 35, …

Hexagonal Hn=n(2n−1) 1, 6, 15, 28, 45, …

It can be verified that T285 = P165 = H143 = 40755.

Find the next triangle number that is also pentagonal and hexagonal.

Problem 44 Pentagon numbers

2016-11-03 13:54:00

Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are:

1, 5, 12, 22, 35, 51, 70, 92, 117, 145, …

It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22 = 48, is not pentagonal.

Find the pair of pentagonal numbers, Pj and Pk, for which their sum and difference are pentagonal and D = |Pk − Pj| is minimised; what is the value of D?

The number, 1406357289, is a 0 to 9 pandigital number because it is made up of each of the digits 0 to 9 in some order, but it also has a rather interesting sub-string divisibility property.

Let d1 be the 1st digit, d2 be the 2nd digit, and so on. In this way, we note the following:

d2d3d4=406 is divisible by 2

d3d4d5=063 is divisible by 3

d4d5d6=635 is divisible by 5

d5d6d7=357 is divisible by 7

d6d7d8=572 is divisible by 11

d7d8d9=728 is divisible by 13

d8d9d10=289 is divisible by 17

Find the sum of all 0 to 9 pandigital numbers with this property.