Jump to content

Numbers whose binary and ternary digit sums are prime: Difference between revisions

Add FOCAL
(Add FOCAL)
Line 241:
199 11000111 5 21101 5
</pre>
 
=={{header|FOCAL}}==
<lang focal>01.10 S P(2)=1;S P(3)=1;S P(5)=1;S P(7)=1
01.20 S V=10
01.30 F N=0,199;D 3
01.40 T !
01.50 Q
 
02.10 S A=0
02.20 S M=N
02.30 S T=FITR(M/B)
02.40 S A=A+M-T*B
02.50 S M=T
02.60 I (-M)2.3
 
03.10 S B=2;D 2;S X=A
03.20 S B=3;D 2;S Y=A
03.30 I (-P(X)*P(Y))3.4;R
03.40 T %4,N
03.50 S V=V-1
03.60 I (-V)3.7;T !;S V=10
03.70 R</lang>
{{out}}
<pre>= 5= 6= 7= 10= 11= 12= 13= 17= 18= 19
= 21= 25= 28= 31= 33= 35= 36= 37= 41= 47
= 49= 55= 59= 61= 65= 67= 69= 73= 79= 82
= 84= 87= 91= 93= 97= 103= 107= 109= 115= 117
= 121= 127= 129= 131= 133= 137= 143= 145= 151= 155
= 157= 162= 167= 171= 173= 179= 181= 185= 191= 193
= 199</pre>
 
=={{header|Haskell}}==
2,124

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.