All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Divisible by Prime Power (Posted on 2023-05-15) Difficulty: 3 of 5
Define d(x) as sum of the digits of x, where x is a hexadecimal positive integer.
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.

  Submitted by K Sengupta    
Rating: 5.0000 (1 votes)
Solution: (Hide)
The first 1011 hexadecimal primes do not have the desired property.

Checking for 1029 (dec) which is 2011(hex) to 4998(dec) which is BDCD (hex), we find that 2312nd prime is equal to 20479(dec) which is equal to 4FFF (hex), so the digits add to 4+3*15 = 49, which is 7^2, and is represented in hex as 31, which adds up to 4, the square of 2.

For a full explanation, refer to the solution submitted by Charlie in this location.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Solutioncomputer solutionCharlie2023-05-15 13:57:09
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information