Math Is Fun Forum

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

You are not logged in.

#1 Re: This is Cool » A Way Of Finding Any Prime Number » 2014-04-06 00:03:58

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

#2 Re: This is Cool » A Way Of Finding Any Prime Number » 2014-04-05 13:56:17

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;
}

#4 Re: Help Me ! » What is a variable, really? » 2014-01-03 04:58:13

Hi;

Say I have the following equations,
y = x + 5
b = 2*a

The first equation has the solution sets, A1={(x, x+5) : x∈R} and A2={(x+5, x) : x∈R}.
The second equation has the solution sets, B1={(x, 2*x) : x∈R} and B2={(2*x, x) : x∈R}

Now if I want to find a point which satisfies both equations, I have first to decide whether x=a or x=b.
In the former case (i.e. x=a), the solution set is: A1 ∩ B1 = A2 ∩ B2 (This means the solution for 2 functions is the same as the solution for their inverses.)
In the latter case, the solution set is: A1 ∩ B2 = A2 ∩ B1

I'm not totally satisfied yet, but is my thinking OK? Am I complicating this?
Thanks for help.

#5 Re: This is Cool » Science Books » 2014-01-02 02:10:33

Hi; below is my updated list. The websites provide free math books; if you find pirated material, then tell me to remove the associated link.

http://www.theassayer.org/cgi-bin/asbrowsesubject.cgi?class=Q
http://www.freescience.info/books.php?id=4&PHPSESSID=c3046af36f33033bc738fa34f64005be
http://www.trillia.com/online-math/index.html
http://cnx.org/content/expanded_browse_subject?subject=Mathematics%20and%20Statistics
http://people.math.gatech.edu/~cain/textbooks/onlinebooks.html
http://www.e-booksdirectory.com/mathematics.php
http://freemathbooks.com/
http://rutherglen.science.mq.edu.au/wchen/ln.html
http://www.sciencebooksonline.info/mathematics.html
http://www.mathontheweb.org/mathweb/mi-books.html
http://web.itu.edu.tr/~delidumanc/math.html
http://math.wikia.com/wiki/List_of_free_mathematics_books
http://www.openculture.com/free_textbooks
http://www.oocities.org/alex_stef/mylist.html
http://2020ok.com/226698.htm
http://webuser.unicas.it/pagliarone/mathtexbooks2.htm
http://www.math.uiuc.edu/~r-ash/
http://javeeh.net/lecnotes/lecnotes.html
https://files.nyu.edu/jmg336/public/html/mathematics.html
https://amser.org/b920509/index.php?P=BrowseResources&FieldId=67
http://www.flooved.com/home
http://www.onlinedegreediscussion.com/free-online-textbooks/mathematics/
http://www.ebyte.it/library/refs/MathOnlineTexts.html
http://freecomputerbooks.com/mathCategory.html
http://physicsdatabase.com/free-math-books/
http://www.freebookcentre.net/SpecialCat/Free-Mathematics-Books-Download.html
http://www.freetechbooks.com/mathematics-f38.html
http://onlinebooks.library.upenn.edu/webbin/book/browse?type=lcsubc&key=Mathematics

#6 Re: Help Me ! » What is the 210th number? » 2014-01-01 13:32:05

I've written all the code, except the sort-algorithm block. This is written in C. I hope I haven't made mistakes.

#include <stdio.h>

// The number of unknowns is 67
int main()
{
    float n[268];
    int i, j, u[67], v[67];

    for(i=0; i<268; i++) {
        n[i]=0;
    }

    for(i=0; i<67; i++) {
        u[i]=-1;
        v[i]=-1;
    }

    i=16;
    do {
        n[i]=3;
        i+=20;
        if(i>267) i-=268;
    } while(i!=16);

    i=82;
    do {
        n[i]=4;
        i+=20;
        if(i>267) i-=268;
    } while(i!=82);

    i=143;
    do {
        n[i]=9;
        i+=20;
        if(i>267) i-=268;
    } while(i!=143);

    i=209;
    j=0;
    do {
        u[j]=i;
        i+=20;
        if(i>267) i-=268;
        j++;
    } while(i!=209);
    SelectionSort(u, 67);

    for(i=0, j=0; i<268; i++) {
        if(n[i]!=0) printf("n[%i]\t: %f\n", i, n[i]);
        else {
                printf("n[%i]\t: Unknown\n", i);
                v[j]=i;
                j++;
        }
    }

    for(i=0; i<67; i++) {
        if(u[i]!=v[i]) printf("All unknowns are not equal.\n");
    }

    return 0;
}

void SelectionSort(int a[], int array_size)
{
     int i;
     for (i = 0; i < array_size - 1; ++i)
     {
          int j, min, temp;
          min = i;
          for (j = i+1; j < array_size; ++j)
          {
               if (a[j] < a[min])
                    min = j;
          }

          temp = a[i];
          a[i] = a[min];
          a[min] = temp;
     }
}

The output becomes:

n[0]    : 3.000000
n[1]    : Unknown
n[2]    : 4.000000
n[3]    : 9.000000
n[4]    : 3.000000
n[5]    : Unknown
n[6]    : 4.000000
n[7]    : 9.000000
n[8]    : 3.000000
n[9]    : Unknown
n[10]   : 4.000000
n[11]   : 9.000000
n[12]   : 3.000000
n[13]   : Unknown
n[14]   : 4.000000
n[15]   : 9.000000
n[16]   : 3.000000
n[17]   : Unknown
n[18]   : 4.000000
n[19]   : 9.000000
n[20]   : 3.000000
n[21]   : Unknown
n[22]   : 4.000000
n[23]   : 9.000000
n[24]   : 3.000000
n[25]   : Unknown
n[26]   : 4.000000
n[27]   : 9.000000
n[28]   : 3.000000
n[29]   : Unknown
n[30]   : 4.000000
n[31]   : 9.000000
n[32]   : 3.000000
n[33]   : Unknown
n[34]   : 4.000000
n[35]   : 9.000000
n[36]   : 3.000000
n[37]   : Unknown
n[38]   : 4.000000
n[39]   : 9.000000
n[40]   : 3.000000
n[41]   : Unknown
n[42]   : 4.000000
n[43]   : 9.000000
n[44]   : 3.000000
n[45]   : Unknown
n[46]   : 4.000000
n[47]   : 9.000000
n[48]   : 3.000000
n[49]   : Unknown
n[50]   : 4.000000
n[51]   : 9.000000
n[52]   : 3.000000
n[53]   : Unknown
n[54]   : 4.000000
n[55]   : 9.000000
n[56]   : 3.000000
n[57]   : Unknown
n[58]   : 4.000000
n[59]   : 9.000000
n[60]   : 3.000000
n[61]   : Unknown
n[62]   : 4.000000
n[63]   : 9.000000
n[64]   : 3.000000
n[65]   : Unknown
n[66]   : 4.000000
n[67]   : 9.000000
n[68]   : 3.000000
n[69]   : Unknown
n[70]   : 4.000000
n[71]   : 9.000000
n[72]   : 3.000000
n[73]   : Unknown
n[74]   : 4.000000
n[75]   : 9.000000
n[76]   : 3.000000
n[77]   : Unknown
n[78]   : 4.000000
n[79]   : 9.000000
n[80]   : 3.000000
n[81]   : Unknown
n[82]   : 4.000000
n[83]   : 9.000000
n[84]   : 3.000000
n[85]   : Unknown
n[86]   : 4.000000
n[87]   : 9.000000
n[88]   : 3.000000
n[89]   : Unknown
n[90]   : 4.000000
n[91]   : 9.000000
n[92]   : 3.000000
n[93]   : Unknown
n[94]   : 4.000000
n[95]   : 9.000000
n[96]   : 3.000000
n[97]   : Unknown
n[98]   : 4.000000
n[99]   : 9.000000
n[100]  : 3.000000
n[101]  : Unknown
n[102]  : 4.000000
n[103]  : 9.000000
n[104]  : 3.000000
n[105]  : Unknown
n[106]  : 4.000000
n[107]  : 9.000000
n[108]  : 3.000000
n[109]  : Unknown
n[110]  : 4.000000
n[111]  : 9.000000
n[112]  : 3.000000
n[113]  : Unknown
n[114]  : 4.000000
n[115]  : 9.000000
n[116]  : 3.000000
n[117]  : Unknown
n[118]  : 4.000000
n[119]  : 9.000000
n[120]  : 3.000000
n[121]  : Unknown
n[122]  : 4.000000
n[123]  : 9.000000
n[124]  : 3.000000
n[125]  : Unknown
n[126]  : 4.000000
n[127]  : 9.000000
n[128]  : 3.000000
n[129]  : Unknown
n[130]  : 4.000000
n[131]  : 9.000000
n[132]  : 3.000000
n[133]  : Unknown
n[134]  : 4.000000
n[135]  : 9.000000
n[136]  : 3.000000
n[137]  : Unknown
n[138]  : 4.000000
n[139]  : 9.000000
n[140]  : 3.000000
n[141]  : Unknown
n[142]  : 4.000000
n[143]  : 9.000000
n[144]  : 3.000000
n[145]  : Unknown
n[146]  : 4.000000
n[147]  : 9.000000
n[148]  : 3.000000
n[149]  : Unknown
n[150]  : 4.000000
n[151]  : 9.000000
n[152]  : 3.000000
n[153]  : Unknown
n[154]  : 4.000000
n[155]  : 9.000000
n[156]  : 3.000000
n[157]  : Unknown
n[158]  : 4.000000
n[159]  : 9.000000
n[160]  : 3.000000
n[161]  : Unknown
n[162]  : 4.000000
n[163]  : 9.000000
n[164]  : 3.000000
n[165]  : Unknown
n[166]  : 4.000000
n[167]  : 9.000000
n[168]  : 3.000000
n[169]  : Unknown
n[170]  : 4.000000
n[171]  : 9.000000
n[172]  : 3.000000
n[173]  : Unknown
n[174]  : 4.000000
n[175]  : 9.000000
n[176]  : 3.000000
n[177]  : Unknown
n[178]  : 4.000000
n[179]  : 9.000000
n[180]  : 3.000000
n[181]  : Unknown
n[182]  : 4.000000
n[183]  : 9.000000
n[184]  : 3.000000
n[185]  : Unknown
n[186]  : 4.000000
n[187]  : 9.000000
n[188]  : 3.000000
n[189]  : Unknown
n[190]  : 4.000000
n[191]  : 9.000000
n[192]  : 3.000000
n[193]  : Unknown
n[194]  : 4.000000
n[195]  : 9.000000
n[196]  : 3.000000
n[197]  : Unknown
n[198]  : 4.000000
n[199]  : 9.000000
n[200]  : 3.000000
n[201]  : Unknown
n[202]  : 4.000000
n[203]  : 9.000000
n[204]  : 3.000000
n[205]  : Unknown
n[206]  : 4.000000
n[207]  : 9.000000
n[208]  : 3.000000
n[209]  : Unknown
n[210]  : 4.000000
n[211]  : 9.000000
n[212]  : 3.000000
n[213]  : Unknown
n[214]  : 4.000000
n[215]  : 9.000000
n[216]  : 3.000000
n[217]  : Unknown
n[218]  : 4.000000
n[219]  : 9.000000
n[220]  : 3.000000
n[221]  : Unknown
n[222]  : 4.000000
n[223]  : 9.000000
n[224]  : 3.000000
n[225]  : Unknown
n[226]  : 4.000000
n[227]  : 9.000000
n[228]  : 3.000000
n[229]  : Unknown
n[230]  : 4.000000
n[231]  : 9.000000
n[232]  : 3.000000
n[233]  : Unknown
n[234]  : 4.000000
n[235]  : 9.000000
n[236]  : 3.000000
n[237]  : Unknown
n[238]  : 4.000000
n[239]  : 9.000000
n[240]  : 3.000000
n[241]  : Unknown
n[242]  : 4.000000
n[243]  : 9.000000
n[244]  : 3.000000
n[245]  : Unknown
n[246]  : 4.000000
n[247]  : 9.000000
n[248]  : 3.000000
n[249]  : Unknown
n[250]  : 4.000000
n[251]  : 9.000000
n[252]  : 3.000000
n[253]  : Unknown
n[254]  : 4.000000
n[255]  : 9.000000
n[256]  : 3.000000
n[257]  : Unknown
n[258]  : 4.000000
n[259]  : 9.000000
n[260]  : 3.000000
n[261]  : Unknown
n[262]  : 4.000000
n[263]  : 9.000000
n[264]  : 3.000000
n[265]  : Unknown
n[266]  : 4.000000
n[267]  : 9.000000

Process returned 0 (0x0)   execution time : 0.110 s
Press any key to continue.

According the my program, all the unknowns should be equal to the 210th number.

Now pick any set of 20 consecutive numbers, then it's plain algebra:

#7 Re: Help Me ! » What is the 210th number? » 2014-01-01 12:50:48

Not yet, I'm working on it... Soon will finish. I've programmed a program for the problem and seen a pattern.

#8 Re: Help Me ! » What is the 210th number? » 2014-01-01 12:10:40

The right answer is anonimnystefy's.

#10 Re: Help Me ! » Circles #2 » 2014-01-01 10:38:27

I'm not sure about the description and can't draw what you describe. Can you post the drawing?

#11 Help Me ! » What is the 210th number? » 2014-01-01 10:34:35

atran
Replies: 6

Hi,

268 numbers are written around a circle. The 17th number is 3, the 83rd is 4 and the 144th is 9, The sum of every 20 consecutive numbers is 72. Find the 210th number.

If every 20 consecutive numbers equal 72, then every 260 consecutive numbers equal 936.

Now take a17 (the 17th number), then the sum of all the 17th-to-8th numbers equals 936. The sum of 18th-to-9th numbers also equals 936. We can see that the a17=a9. While repeating the process I realize the pattern, a17=a9=a1=a261=a253=a245, etc..., that is, the index is subtracted by 8 each time. How can I prove that this pattern continues without calculating each term?

And is there a shortcut for solving the problem?
Thanks for help.

#12 Re: Help Me ! » What is a variable, really? » 2014-01-01 09:09:08

Hi. I have another question. Say x²=y², then what does follow? |x| = |y| or y=±x?

#14 Help Me ! » Is it possible to solve this without guessing? » 2013-12-31 03:53:19

atran
Replies: 32

Hi;

A, B, C can walk at 5 km/hr. They have a car that can accomodate any two of them which travels at 50 km/hr. Can they reach a point 62km away in less than 3 hrs?

How can I solve this without guessing?
Thanks for help.

#15 Re: Help Me ! » Circles » 2013-12-30 07:10:36

Here is my solution. I hope I haven't made mistakes. If I have, please correct me.
Here is the link to the image:

http://imgur.com/JdjngAY

Look at the triangle PCR; you know all the sides, so you can use the cosine rule to find the angle (a). After a little work you have:

Now you need (x). To find it, you need to use the sine rule. Applying the rule you get:

Next you need to find the height of the original triangle (call it h):

So the area is equal to:

#16 Re: Help Me ! » Circles » 2013-12-30 06:39:03

Nehushtan wrote:
atran wrote:

The problem becomes easy when you draw three radii inside the triangle; each radius connected to one point of the triangle.

You can’t. The sides of the triangle are shorter than the radius of the circle.

You're right.

#17 Re: Help Me ! » Circles » 2013-12-30 05:56:38

Aren't you allowed to use the cosine rule?

#18 Re: Help Me ! » Circles » 2013-12-30 05:29:14

Use the cosine rule first, and then the sine rule.

#19 Re: Help Me ! » Circles » 2013-12-30 05:27:58

The problem becomes easy when you draw three radii inside the triangle; each radius connected to one point of the triangle.

#20 Re: Help Me ! » What number is in the middle? » 2013-12-29 08:42:49

OK, here is the solution (this is difficult):

The first number is 1 and the last one 25.
The total sum is 127.
The sum of the first nine numbers is: S[1-9] = 21
The sum of the last nine numbers is: S[19-27] = 65
From the above sums we deduce that S[10-18] = 41

IF S[1-9]=21 THEN 2 < a9
IF S[19-27]=65 THEN 4 < a26
IF S[10-18]=41 THEN 4 < a18

IF S[19-26]=40 THEN 19-26th numbers are equal to 5; this implies a18=5
IF S[10-17]=36 THEN 4 < a17 and therefore a17=5
IF S[10-16]=31 THEN 4 < a16 and therefore a16=5
IF S[10-17]=26 THEN 4 < a15 and therefore a15=5
IF S[10-17]=21 THEN 4 < a14 and therefore a14=5

#21 Re: Help Me ! » What number is in the middle? » 2013-12-29 07:20:33

I got it right! I'm re-solving it to post it here.

#23 Help Me ! » What number is in the middle? » 2013-12-29 03:31:40

atran
Replies: 9

Hi, here follows the translation of a problem:

In a paper, Ida has written on a line 27 positive integers, ordered by size. The first number is 1 and the last one is 25. Ida tells Emil that the sum of all numbers is 127, the sum of the first nine numbers is 21, and the the sum of the last nine numbers is 65. Suffice that information to Emil to decide what number is standing in the middle?

The only thing I could figure out is the sum 41, which is ∑(a[i]) from i=10 to 18. I need to find (if possible) the 14th number.
I need hints rather than solutions, thanks for your help.

#24 Re: Help Me ! » What is a variable, really? » 2013-12-28 09:40:26

Hi bobbym,
Thank you for the tip, that I should keep going despite not having total comprehension.

If I can, I will express my thoughts more clearly. Maybe it's the algorithm I've no "proof" of.
I will get back to this later, now I'm thinking to spend my time on something else.

#25 Re: Help Me ! » What is a variable, really? » 2013-12-28 06:19:18

Any equation (with variables) has infinite solutions, except a one-variable equation. A solution set is the set of solutions to a given equation. Now I have a system of equations:
2x + 5y = 10
3x - 5y = 7
Since the system is linear it must have infinitely-many, one, or no solutions. This system has a unique solution, which is x=3.4 and y=0.64.

The system has two variables, x and y. The purpose is to find one x and one y satisfying both equations. The first graph represents the solutions to the first equation, and the second graph is the solution to the second equation. Each solution is an ordered pair, so the first element of the ordered pair is substituted for x while the second for y. The point (3.4, 0.64) is the only solution to the system, so the graph of the system is only that point.

I'm honest, I still don't understand how the two equations are connected together and how the solution is obtained. I used to understand it before, but now, despite what I've just described, I'm still feeling lost. I don't know how to express my thoughts to make my problem visible. I also looked at many pages on internet but it didn't help...

Board footer

Powered by FluxBB