primes in ternary | ScratchStats