Pernicious numbers: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
Added PicoLisp
Line 1,351:
<pre>3 5 6 7 9 10 11 12 13 14 17 18 19 20 21 22 24 25 26 28 31 33 34 35 36
888888877 888888878 888888880 888888883 888888885 888888886</pre>
 
=={{header|PicoLisp}}==
Using 'prime?' from [[Primality by trial division#PicoLisp]].
<lang PicoLisp>(de pernicious? (N)
(prime? (cnt = (chop (bin N)) '("1" .))) )</lang>
Test:
<lang PicoLisp>: (let N 0
(do 25
(until (pernicious? (inc 'N)))
(printsp N) ) )
3 5 6 7 9 10 11 12 13 14 17 18 19 20 21 22 24 25 26 28 31 33 34 35 36 -> 36
 
: (filter pernicious? (range 888888877 888888888))
-> (888888877 888888878 888888880 888888883 888888885 888888886)</lang>
 
=={{header|PL/I}}==