Wieferich primes: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added whitespace and comments, added a "filter" comment.) |
(add APL solution) |
||
Line 19: | Line 19: | ||
;* [[oeis:A001220|OEIS A001220 - Wieferich primes]] |
;* [[oeis:A001220|OEIS A001220 - Wieferich primes]] |
||
<br> |
<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}}== |
=={{header|C}}== |