Given an integer N, the task is to find the sum of N and it’s maximum prime factor.
Maximum prime factor of 19 is 19.
Hence, 19 + 19 = 38
8 + 2 = 10
Approach: Find the largest prime factor of the number and store it in maxPrimeFact then print the value of N + maxPrimeFact.
Below is the implementation of the above approach:
- Numbers with sum of digits equal to the sum of digits of its all prime factor
- Sum of Maximum and Minimum prime factor of every number in the Array
- Sum of largest prime factor of each number less than equal to n
- Find largest prime factor of a number
- Find N numbers such that a number and its reverse are divisible by sum of its digits
- Queries on the sum of prime factor counts in a range
- k-th prime factor of a given number
- N-th prime factor of a given number
- Exactly n distinct prime factor numbers from a to b
- Least prime factor of numbers till n
- Nearest element with at-least one common prime factor
- Count all the numbers less than 10^6 whose minimum prime factor is N
- Prime Factor
- Count of distinct power of prime factor of N
- Find the total number of composite factor for a given number
- Maximum length subsequence such that adjacent elements in the subsequence have a common factor
- Check if a prime number can be expressed as sum of two Prime Numbers
- Find coordinates of a prime number in a Prime Spiral
- Minimum absolute difference of a number and its closest prime
- Smallest N digit number with none of its digits as its divisor
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.