#45 - Triangular, pentagonal, and hexagonal

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

TypeFormulaFirst terms
Triangle$T_n=\frac{1}{2}n(n+1)$1, 3, 6, 10, 15, …
Pentagonal$P_n=\frac{1}{2}n(3n-1)$1, 5, 12, 22, 35, …
Hexagonal$H_n=n(2n-1)$1, 6, 15, 28, 45, …

It can be verified that $T_{285}=P_{165}=H_{143}=40755$.

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


#44 - Pentagonal numbers

Pentagonal numbers are generated by the formula, $P_n=\frac{1}{2}n(3n-1)$. The first ten pentagonal numbers are: \[1,5,12,22,35,51,70,92,117,145,\dots\]

It can be seen that $P_4+P_7=22+70=92=P_8$. However, their difference, $70-22=48$, is not pentagonal.

Find the pair of pentagonal numbers, $P_j$ and $P_k$, for which their sum and difference are pentagonal and $D=\lvert P_j - P_k\rvert$.


#43 - Sub-string divisibility

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 $d_1$ be the 1st digit, $d_2$ be the 2nd digit, and so on. In this way, we note the following:

  • $d_2d_3d_4=406$ is divisible by 2
  • $d_3d_4d_5=063$ is divisible by 3
  • $d_4d_5d_6=635$ is divisible by 5
  • $d_5d_6d_7=357$ is divisible by 7
  • $d_6d_7d_8=572$ is divisible by 11
  • $d_7d_8d_9=728$ is divisible by 13
  • $d_8d_9d_{10}=289$ is divisible by 17

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


#42 - Coded triangle numbers

The $n^{\text{th}}$ term of the sequence of triangle numbers is given by, $t_n=\frac{1}{2}n(n+1)$; so the first ten triangle numbers are: \[1,3,6,10,15,21,28,36,45,55,\dots\]

By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For example, the word value for SKY is $19+11+25=55=t_{10}$. If the word value is a triangle number then we shall call the word a triangle word.

Using words.txt (right click and ‘Save Link/Target As…’), a 16K text file containing nearly two-thousand common English words, how many are triangle words?


#40 - Champernowne's constant

An irrational decimal fraction is created by concatenating the positive integers:

0.123456789101112131415161718192021...

It can be seen that the 12th digit of the fractional part is 1.

If $d_n$ represents the $n^{\text{th}}$ digit of the fractional part, find the value of the following expression: \[d_1\times d_{10}\times d_{100}\times d_{1000}\times d_{10000}\times d_{100000}\times d_{1000000}\]


#41 - Pandigital prime

We shall say that an $n$-digit number is pandigital if it makes use of all the digits 1 to $n$ exactly once. For example, 2143 is a 4-digit pandigital and is also prime.

What is the largest $n$-digit pandigital prime that exists?


#39 - Integer right triangles

If $p$ is the perimeter of a right angle triangle with integral length sides, ${a,b,c}$, there are exactly three solutions for $p = 120$. \[\begin{aligned} \{20,48,52\},\{24,45,51\},\{30,40,50\} \end{aligned}\]

For which value of $p\leq1000$, is the number of solutions maximised?


#38 - Pandigital multiples

Take the number 192 and multiply it by each of 1, 2, and 3: \[192\times1=192 \\ 192\times2=384 \\ 192\times3=576\]

By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1,2,3).

The same can be achieved by starting with 9 and multiplying by 1, 2, 3, 4, and 5, giving the pandigital, 918273645, which is the concatenated product of 9 and (1,2,3,4,5).

What is the largest 1 to 9 pandigital 9-digit number that can be formed as the concatenated product of an integer with (1,2,…,$n$) where $n$ > 1?


#37 - Truncatable primes

The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, 3.

Find the sum of the only eleven primes that are both truncatable from left to right and right to left.

2, 3, 5, and 7 are not considered to be truncatable primes.


#36 - Double-base palindromes

The decimal number, $585=1001001001_2$ (binary), is palindromic in both bases.

Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.

(Please note that the palindromic number, in either base, may not include leading zeros.)


Pagination