Re: More on triangle numbers and primes!



>Well, let's do one...

>Is 31 prime ?

>31 \ 3 = 10
>9 \ 3 = 3
>10 - 3 = 7
>(7 * 3) + 9 = 30
>30 + 3 = 33
>There is not a 31 on row one...

>31 \ 4 = 7
>14 \ 4 = 3
>7 - 3 = 4
>(4 * 4) + 14 = 30
>30 + 4 = 34
>There is not a 31 on row two...

>31 \ 5 = 6
>20 \ 5 = 4
>6 - 4 = 2
>(2 * 5) + 20 = 30
>30 + 5 = 35
>There is not a 31 on row three...

>31 \ 6 = 5
>27 \ 6 = 4
>5 - 4 = 1
>(1 * 6) + 27 = 33
>There is not a 31 on row four...

>Row five begins with 35 which is greater than 33
>Finished.
>31 is prime

>Of course this out performs trial division when working >with larger numbers
>but not with small numbers...

Sure, that's how I found the 1,000 nth + prime.
You are just talking about stopping points here
because you had to go through the other primes >7
to get to prime 31. [11,13,17,19,23,29]
I knew the 1000 nth prime was >7000 but <8000 so
my last set I used was [8xxx,n] just to make sure
it was high enough for the check. Like your stopping
point [35,7] for your prime check 31.

Dan
.



Relevant Pages

  • Re: (40K) ABv.3 vs. GW army builder
    ... IIRC the GW software ... hasn't been updated to handle 4th edition changes yet. ... Dan ... Prev by Date: ...
    (rec.games.miniatures.warhammer)
  • Re: hypenation
    ... But normally folks put the entire \hyphenation command in a file and ... Dan ... Prev by Date: ...
    (comp.text.tex)
  • Re: DLink DSL300T with multiple public IPs
    ... What would be a good replacement as an ADSL modem + Ethernet port? ... Dan ... Prev by Date: ...
    (uk.telecom.broadband)
  • Re: Astie de race de caves !
    ... Pas pour etre mechant, mon Gerard, mais les newsgroups existent depuis ... plus longtemps que le Web. ... Dan. ... Prev by Date: ...
    (soc.culture.quebec)
  • Re: Bad news on my home front
    ... Losing our furkids is so very difficult. ... Dan ... Prev by Date: ...
    (rec.pets.cats.anecdotes)