d(d(x)) denotes the sum of digits of d(x).
For example, when x=(ABC)16
Then, d(x) = (A)16+(B)16+(C)16 = (21)16
and, d(d(x)) = 2 + 1 = 3
Consider the first 1011 (base ten) values of a hexadecimal prime number N.
Devise an algorithm such that:
• Each of d(N) and d(d(N)) is divisible by a prime power.
Note: A prime power is a number of the form pn, where p is a prime number, and n is an integer greater than 1.