Numbers which binary and ternary digit sum are prime