Number of Integers (<N) divisible only by one power of 2

In summary, the conversation discusses a problem where for a given number k = d + n/d, where d is a divisor of another number n, the goal is to find the number of k <= N that are prime. It is determined that for k to be prime, it must be odd, and that d and n/d cannot both be even or odd. It is suggested to count all integers < N that are divisible only by one power of 2, but there is uncertainty about how to treat designated k and possible solutions using the mod function and number theory are proposed. The conversation ends with a clarification that every integer k can be expressed as d+n/d and a discussion about the problem statement.
  • #1
chaoticflow
8
0
TL;DR Summary
Count all integers < N that are divisible only by one power of 2
Hi,

The original problem was : for a given number k = d + n/d, where d is a divisor of another number n, how many k <= N are prime?

When I looked at this problem, for k to be prime > 2, it has to be odd.

This implies d and n/d can't both be even or odd. If d = 2, then d is even and n/d has to be odd.

Thus, n/d can't have more than one power of two.

If I can work out how to count integers <= N that only have one power of two, I can then test for primality within those integers. Any help in working this out, or if you could point out a general direction I should be looking in will be greatly appreciated.

Thanks,
 
Mathematics news on Phys.org
  • #2
All k,d and n are designated or only a part of them ?
 
  • #3
I'm not sure what designated means here. Can you clarify?
 
  • #4
Also, I've worked out the problem a bit more:

For n < N, n = p1^a1 * p2^a2 * p3^a3. ... and so on where pi are prime factors of n and ai are powers of pi.

We know the highest power of a prime factor, pi is ai_max = log(n) - where base of log is pi. I.e. ai_max = int(log(n,pi))

Thus, every valid number will have the form n = 2* p2^a2*p3^a3 ... and so on. I.e. if one has N = 100, possible primes that can generate a number are 2/3/5/7 with max powers 6/4/2/2.

This can give us a count of possible numbers as 1*(4+1)*(2+1)*(2+1) = 16.

However, there will be some numbers that are greater than N. I.e. 2 * 3^4 * 5^2 * 7^2.

A brute force solution would be to iterate through all combinations and reject those which give a number > N.

However, is there a better way to solve this?

It seems like I'm missing something here - there's probably a simpler solution that uses the mod function and number theory.
 
  • #5
[tex]8=6+\frac{12}{6}=5+\frac{15}{5}=4+\frac{16}{4}=3+\frac{15}{3}=... [/tex]
For designated k there are many possible d's and n's. I am not sure how I should treat them.

[tex]2=1+\frac{1}{1}[/tex]
[tex]3=1+\frac{2}{1}=2+\frac{1}{1}[/tex]
[tex]5=1+\frac{4}{1}=2+\frac{6}{2}=3+\frac{6}{3}=4+\frac{4}{4}[/tex]
I am almost sure any prime number is expressed as form ##d+\frac{n}{d}##.
 
Last edited:
  • #6
chaoticflow said:
Summary:: Count all integers < N that are divisible only by one power of 2

The original problem was : for a given number k = d + n/d, where d is a divisor of another number n, how many k <= N are prime?
I don't understand this. Say ##\dfrac{n}{d}=e##, so ##k=d+e##. Every number ##k## can be written like this in multiple ways. Hence this isn't a condition at all and the question comes down to: How many primes are less than ##N##? Answer ##\dfrac{N}{\log N}.##
 
  • #7
Numbers that are divisible by 2 but not higher powers of 2? Isn't that just 2+4k, i.e. every 4th number?

Note that e.g. d=4, n=12 leads to k = 4+12/4 = 7 which is prime.

Every integer k can be expressed as d+n/d, e.g. by choosing n=d=k-1.

A problem statement that says "a given number k" and then asks for how many k something is true is strange.
 

FAQ: Number of Integers (<N) divisible only by one power of 2

How do you define "divisible only by one power of 2"?

"Divisible only by one power of 2" means that the integer can only be divided by one specific power of 2, and not any other numbers. For example, the number 8 is divisible only by 2^3, but not by 2^2 or 2^4.

What is the formula for finding the number of integers divisible only by one power of 2?

The formula for finding the number of integers divisible only by one power of 2 is 2^(N-1), where N is the exponent of the power of 2. For example, if N=4, then the number of integers divisible only by one power of 2 is 2^(4-1) = 8.

Can you provide an example of an integer divisible only by one power of 2?

One example of an integer divisible only by one power of 2 is 32. It can only be divided by 2^5, but not by any other powers of 2.

How does the number of integers divisible only by one power of 2 change as N increases?

As N increases, the number of integers divisible only by one power of 2 also increases. This is because the higher the exponent of the power of 2, the larger the range of integers that can be divided by only one power of 2.

What is the significance of studying the number of integers divisible only by one power of 2?

Studying the number of integers divisible only by one power of 2 can help in understanding patterns and relationships between numbers. It can also be useful in various mathematical and scientific applications, such as in coding and cryptography.

Similar threads

Back
Top