Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**Primenumbers****Member**- Registered: 2013-01-22
- Posts: 51

2m

6m+3

30m+5 or 25

210m+7 or 7x7 or 7x11 or 7x13 or 7x17 or 7x19 or 7x23 or 7x29

For 121 count the No. of numbers it passes and minus it from 121 then -2 for 1 and itself and + 4 for 2, 3, 5, and 7, I got 30 which is the No. of primes below 121

**"Time not important. Only life important."*** - The Fifth Element 1997*

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,283

Hi;

Yes, i think I got it.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

Does it work?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'But our love is like the wind. I can't see it but I can feel it.' -A Walk to remember

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,283

So far I have not found a counterexample.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

Great!

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'But our love is like the wind. I can't see it but I can feel it.' -A Walk to remember

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,283

I have not worked very hard on it yet.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,132

Hi,

I don't think I'm understanding it all (sorry).

How does post #26 relate to the rule in post #19?

What does the 'm' in the first four lines of post #26 represent?

I need to have post #26 explained to me.

Also, isn't the p3 missing from this in post #19?:

Let p1=2, p2=3, p4=5 p5=7 p6=11 and so on up to infinity.

And re the first part of the rule in post #19:

Rule= [p2*p3*p4*px]

Shouldn't that read something like [p2*p3*p4*...*px] (or however you properly notate that series). I presume it's intended to be the product of all primes from the second prime (3) to the xth prime.

Here's my code (based on bobbym's) as I understand the post #19 rule:

*Last edited by phrontister (2014-02-06 17:21:08)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,132

Here's a slightly amended code that catches two more 'solutions'...that is, if I'm understanding things right (but I'm still very unsure about that).

*Last edited by phrontister (2014-02-07 08:02:47)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,283

Hi phrontister;

I am not at all sure that the code I have is correct.

My code is for post #11.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,132

Hi Bobby,

Yes, I saw that your code was for that post, but when I checked it out I didn't think it covered all bases and so I came up with my code in post #32.

In your first expression, your formula for the part that is deducted is 2y, whereas Primenumbers has it as this:

[2^y multiplied by any No. that is not divisible by all the primes in the series you used]

I take it that y is any positive integer (see post #19), and that the 11 in the first example in post #11 is the value of z (see post #19), being the next prime after the last in the series (and thus not being divisible by any of the primes in the series).

What's throwing out my thinking about all this is that the examples given by Primenumbers don't appear to agree precisely with the descriptions that precede them and on which they are based.

And I'm still very hazy about post #26.

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,283

I can not follow it at all and will leave him to you. Good luck and happy hunting.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,132

Re post #26, I don't understand what this means:

Primenumbers wrote:

2m

6m+3

30m+5 or 25

210m+7 or 7x7 or 7x11 or 7x13 or 7x17 or 7x19 or 7x23 or 7x29

One thing that I can see from the 2, 6, 30 and 210 in those four lines is this:

First line = p1 = 2

Second line = first line x p2 = 2 x 3 = 6

Third line = second line x p3 = 6 x 5 = 30

Fourth line = third line x p4 = 30 x 7 = 210.

And I'm still wondering what the 'm' represents.

Primenumbers wrote:

For 121 count the No. of numbers it passes and minus it from 121 then -2 for 1 and itself and + 4 for 2, 3, 5, and 7, I got 30 which is the No. of primes below 121

What are the 'numbers' in "No. of numbers"? I presume that "it passes" refers to qualifying numbers less than itself.

Anyway, it appears that there are 93 such qualifying numbers, as from the sum above (as I understand it), 121 - 93 - 2 + 4 = 30, which is the answer given.

Offline

**Primenumbers****Member**- Registered: 2013-01-22
- Posts: 51

because can not have any possible factors other than 1 and itself.

**"Time not important. Only life important."*** - The Fifth Element 1997*

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,283

Hi;

What are the restrictions on a,b,c,d...p and P?

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**Primenumbers****Member**- Registered: 2013-01-22
- Posts: 51

Prime Number TEST!: (where p is Prime)

Repeat process until y<p, exchanging y for p. Then when y<p, y will be a recognizable prime (though not found in A), if this is not the case then p is NOT prime.

**"Time not important. Only life important."*** - The Fifth Element 1997*

Offline

**atran****Member**- Registered: 2013-07-12
- Posts: 91

Primenumbers wrote:

[All the primes in the series up to a point, multiplied together, multiplied by any odd No.], minus, [2^y multiplied by any No. that is not divisible by all the primes in the series you used]. Will equal a prime No. when >1 and <the next No. in the series after the point multiplied by itself by definition. Oh and y must be at least 1.

Assuming that the number, multiplied by 2^y and not divisible by any of those primes, is at least 1 and an integer, then:

1) Given the first two prime numbers, then all the solutions are: 7, 11, 13

2) Given the first three prime numbers, all the solutions are: 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

3) Given the first four prime numbers, then: 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101

4) Given the first five prime numbers, then: 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103

5) My program can't compute more, the reason may be capacity limitation or inappropriate use of data types...

Anyway, here's the algorithm I wrote to produce the results above:

```
void print_prime(unsigned short number_of_primes)
{
unsigned int prime_product = 1, last_prime, largest_prime, prime_out;
unsigned short number, i, j, k;
bool flag1 = 1, flag2 = 1;
for(number=3, i=0; i<number_of_primes; number++)
{
if(is_prime(number) == true)
{
prime_product *= number;
i++;
}
}
last_prime = number - 1;
while(true)
{
if(is_prime(number) == true)
{
largest_prime = number;
break;
}
number++;
}
for(i = 1; true; i += 2)
{
for(j = 1; true; j++)
{
for(k = 1; true; k++)
{
for(number = 3; number<=last_prime; number++)
{
if(is_prime(number) == true)
if(k%number == 0) goto next;
}
prime_out = prime_product*i - pow(2, j)*k;
if(prime_out < 2 && i==1 && j==1)
{
flag1 = 0;
flag2 = 0;
break;
} else if(prime_out < 2 && j==1)
{
flag2 = 0;
break;
} else if(prime_out < 2) break;
else if(prime_out < (unsigned int)pow(largest_prime, 2)) {
if(is_prime(prime_out) != 1)
printf("NOT %d\n", prime_out);
else printf("%d\n", prime_out);
}
next: ;
}
if(flag2 == 0) break;
}
if(flag1 == 0) break;
}
}
```

The above function basically prints out the solutions for a given number of primes; it also informs if it encounters a composite result. The is_prime() function in the above function is defined as follows:

```
bool is_prime(unsigned int number)
{
int i;
if(number < 2) return false;
for(i=2; i<=sqrt(number); i++)
{
if(number%i == 0) return false;
} return true;
}
```

Offline

**atran****Member**- Registered: 2013-07-12
- Posts: 91

atran wrote:

Assuming that the number, multiplied by 2^y and not divisible by any of those primes, is at least 1 and an integer, then:

1) Given the first two prime numbers, then all the solutions are: 7, 11, 13

2) Given the first three prime numbers, all the solutions are: 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

3) Given the first four prime numbers, then: 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101

4) Given the first five prime numbers, then: 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103

5) My program can't compute more, the reason may be capacity limitation or inappropriate use of data types...

Sorry, I didn't list all solutions for each number of primes... Below are the full solutions:

Given the first **three prime numbers**, all the solutions are: 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103

Given the first **four prime numbers**, then: 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167

Given the first **five prime numbers**, then: 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283

*Last edited by atran (2014-04-06 00:06:07)*

Offline