Wolstenholme numbers: Difference between revisions
Content added Content deleted
m (→{{header|Python}}: simplify output functions) |
(J draft) |
||
Line 24: | Line 24: | ||
;* [[oeis:A123751|OEIS:A123751 - Prime Wolstenholme numbers]] |
;* [[oeis:A123751|OEIS:A123751 - Prime Wolstenholme numbers]] |
||
=={{header|J}}== |
|||
<syntaxhighlight lang=J>NB. the first y members of the Wholstenhome sequence |
|||
WolstenholmeSeq=: {{ 2 {."1@x:+/\%*:1x+i.y }} |
|||
WolstenholmeSeq 20 |
|||
1 5 49 205 5269 5369 266681 1077749 9778141 1968329 239437889 240505109 40799043101 40931552621 205234915681 822968714749 238357395880861 238820721143261 86364397717734821 17299975731542641 |
|||
(#~ 1 p: ])WolstenholmeSeq 20 |
|||
5 266681 40799043101 86364397717734821 |
|||
</syntaxhighlight> |
|||
=={{header|Python}}== |
=={{header|Python}}== |