Wieferich primes: Difference between revisions

add APL solution
m (→‎{{header|REXX}}: added whitespace and comments, added a "filter" comment.)
(add APL solution)
Line 19:
;* [[oeis:A001220|OEIS A001220 - Wieferich primes]]
<br>
 
=={{header|APL}}==
'''Works in:''' [[Dyalog APL]]
<lang apl> ⎕CY 'dfns' ⍝ import dfns namespace
⍝ pco ← prime finder
⍝ nats ← natural number arithmetic (uses strings)
⍝ Get all Wieferich primes below n:
wief←{{⍵/⍨{(,'0')≡(×⍨⍵)|nats 1 -nats⍨ 2 *nats ⍵-1}¨⍵}⍸1 pco⍳⍵}
wief 5000
1093 3511
</lang>
 
=={{header|C}}==
236

edits