Special neighbor primes: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
{{Draft task}}
{{Draft task}}


;Task:Let &nbsp; ('''p<sub>1</sub>''', &nbsp;'''p<sub>2</sub>''') &nbsp; are neighbour primes. Find and show here in base ten if '''p<sub>1</sub>+&nbsp;p<sub>2</sub>&nbsp;-1''' is prime,&nbsp; where &nbsp; '''p<sub>1</sub>, &nbsp; p<sub>2</sub> &nbsp;&lt;&nbsp; 100'''.
;Task:Let &nbsp; ('''p<sub>1</sub>''', &nbsp;'''p<sub>2</sub>''') &nbsp; are neighbor primes. Find and show here in base ten if '''p<sub>1</sub>+&nbsp;p<sub>2</sub>&nbsp;-1''' is prime,&nbsp; where &nbsp; '''p<sub>1</sub>, &nbsp; p<sub>2</sub> &nbsp;&lt;&nbsp; 100'''.


<br><br>
<br><br>
Line 10: Line 10:


see "working..." + nl
see "working..." + nl
see "Special neighbour primes are:" + nl
see "Special neighbor primes are:" + nl
row = 0
row = 0
oldPrime = 2
oldPrime = 2
Line 25: Line 25:
next
next


see "Found " + row + " special neighbour primes"
see "Found " + row + " special neighbor primes"
see "done..." + nl
see "done..." + nl
</lang>
</lang>
Line 31: Line 31:
<pre>
<pre>
working...
working...
Special twin primes are:
Special neighbor primes are:
3,5 => 7
3,5 => 7
5,7 => 11
5,7 => 11
Line 45: Line 45:
67,71 => 137
67,71 => 137
73,79 => 151
73,79 => 151
Found 13 special twin primesdone...
Found 13 special neighbor primes
done...
</pre>
</pre>