;Definitions &nbsp; (as per number theory):
::* &nbsp; The &nbsp; '''prime(''p'')''' &nbsp; is the &nbsp; ''' ''p''<sup>th</sup> &nbsp; prime.
:::::* &nbsp; '''prime(1)''' &nbsp; is &nbsp; '''2'''
:::::* &nbsp; '''prime(4)''' &nbsp; is &nbsp; '''7'''
::* &nbsp; A &nbsp; '''     strong &nbsp; prime''' &nbsp; is when &nbsp; &nbsp; <big>'''prime(''p'')'''</big> &nbsp; is &nbsp; <big>'''>''' &nbsp; '''[prime(''p''-1) + prime(''p''+1)] ÷ 2</big>'''
::* &nbsp; A &nbsp; '''&nbsp; weak &nbsp;&nbsp; prime''' &nbsp; is when &nbsp; &nbsp; <big>'''prime(''p'')'''</big> &nbsp; is &nbsp; <big>'''<''' &nbsp; '''[prime(''p''-1) + prime(''p''+1)] ÷ 2</big>'''



Note that the definition for &nbsp;  '''strong primes''' &nbsp; is different when used in the context of &nbsp; cryptography.


;Task:
::* &nbsp; Find and display (on one line) the first &nbsp; '''36''' &nbsp; strong primes.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the strong primes below &nbsp; 1,000,000.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the strong primes below 10,000,000.
::* &nbsp; Find and display (on one line) the first &nbsp; '''37''' &nbsp; weak primes.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the weak primes below &nbsp; 1,000,000.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the weak primes below 10,000,000.
::* &nbsp; (Optional) &nbsp; display the &nbsp; ''counts'' &nbsp; and &nbsp; "below numbers" &nbsp; with commas.

Show all output here.


;Related Task:
::* &nbsp; [[Safe primes and unsafe primes]].


;Also see:
::* &nbsp; The OEIS article [[oeis:A051634|A051634: strong primes]].
::* &nbsp; The OEIS article [[oeis:A051635|A051635: weak primes]].
<br><br>

