# P r o b l e m s

Solve problems from Creative Computing Magazine

### Problem #1

Assume a life-span of 80 years. In what year of
the 20th century (1900-1999) would you have to
be born in order to have the maximum number of
prime birthdays occurring in prime years? The
minimum number?

Maximum: 1948
Minimum: 1902

### Problem #2

There are 720 ways to arrange the digits 1
through 6 as six-digit numbers:

123456
123465
123546
etc.

If you continue this sequence, in numerical
order, what will be the 417th number in the series?
What will be the nth?

417th: 432516

### Problem #3

Defined a perfect digital invariant as an integer containing N digits, where
the sum of the Nth powers of the digits is equal to the integer itself.
In general, ... Hn + ... + In + Jn + Kn = ... (10n-1H) ... (10^2I) (10^1J) (10^0K)
If N is 3, then I^3 + J^3 + K^3 = 100I + 10J + K
371 is one such number, for 3^3 +7^3 + 1^3 = 27 + 343 + 1
Find digital invariants for N less than or equal to 4.

Solution: 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474

### Problem #4

A Pythagorean triple is a set of three positive integers that satisfy A2 + B2 = C2.
Let's find some of these triples.

Find all triples in which A and B are less than or equal to 100.

Solution: (3,4,5) (5,12,13) (7,24,25) (8,15,17) (9,40,41) (11,60,61) (12,35,37) (13,84,85)
(16,63,65) (20,21,29) (20,99,101) (28,45,53) (33,56,65) (36,77,85) (39,80,89) (48,55,73) (60,91,109) (65,72,97)