;Definitions:
::* &nbsp; A &nbsp; '''safe prime''' &nbsp; is a prime &nbsp; '''p''' &nbsp; and where &nbsp; '''(p-1)/2''' &nbsp; is also prime.
::* &nbsp; The corresponding prime &nbsp;'''(p-1)/2''' &nbsp; is known as a &nbsp; '''Sophie Germain''' &nbsp; prime.
::* &nbsp; An &nbsp; '''unsafe prime''' &nbsp; is a prime &nbsp; '''p''' &nbsp; and where &nbsp; '''(p-1)/2''' &nbsp; ''isn't'' &nbsp; a prime.
::* &nbsp; An &nbsp; '''unsafe prime''' &nbsp; is a prime that &nbsp; ''isn't'' &nbsp; a &nbsp; '''safe''' &nbsp; prime.


;Task:
::* &nbsp; Find and display (on one line) the first &nbsp; '''35''' &nbsp; safe primes.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the safe primes below &nbsp; 1,000,000.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the safe primes below 10,000,000.
::* &nbsp; Find and display (on one line) the first &nbsp; '''40''' &nbsp; unsafe primes.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the unsafe primes below &nbsp; 1,000,000.
::* &nbsp; Find and display the &nbsp; ''count'' &nbsp; of the unsafe 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; [[Strong_and_weak_primes|strong and weak primes]].


;Also see:
::* &nbsp; The OEIS article: &nbsp; [http://oeis.org/A005385 &nbsp; safe &nbsp; primes].
::* &nbsp; The OEIS article: &nbsp; [http://oeis.org/A059456 unsafe primes].


