All FS *(I'll be using that term for Friend Safari)* Pokemon have two perfect IVs, so that's 1/1 if you want a 2 IV Ditto.

There is a 1/32 chance you can get any IV from 0 to 31. So if you want a 3 IV Ditto, there is a 1/32 chance.

Same with 4 IVs, you just multiply the chance by 32 since there are 32 new possible IVs, or 1/1024.

You keep going with 5 IVs and 6IVs to get 1/32768 and 1/1048576 respectively.

Comparing this with a regular wild Ditto you can catch in the Pokemon Village, that has a 1/1073741824 *(more than 1/one trillion)* chance to have perfect IVs.

**tl;dr Simple Chart:**

2 IV FS Pokemon: 1/1

3 IV FS Pokemon: 1/32

4 IV FS Pokemon: 1/1024

5 IV FS Pokemon: 1/32768

6 IV FS Pokemon: 1/1048576

0 IV Normal Pokemon: 31/32

1 IV Normal Pokemon: 1/32

2 IV Normal Pokemon: 1/1024

3 IV Normal Pokemon: 1/32768

4 IV Normal Pokemon: 1/1048576

5 IV Normal Pokemon: 1/33554432

6 IV Normal Pokemon: 1/1073741824

*Source: Simple Calculations and Experience with your torture questions before*