Super-Poulet numbers: Difference between revisions
Content added Content deleted
(J draft) |
m (→{{header|J}}) |
||
Line 40: | Line 40: | ||
=={{header|J}}== |
=={{header|J}}== |
||
Implementation:<lang J>spou1=: {{ 2 = 2x(y&|)@^ y }} |
Implementation (only good for the first 60 super-poulet numbers):<lang J>spou1=: {{ 2 = 2x(y&|)@^ y }} |
||
is_super_poulet=: {{ |
is_super_poulet=: {{ |
||
Line 54: | Line 54: | ||
Task example:<lang J> 20{. (#~ is_super_poulet) 1+i.1e5 |
Task example:<lang J> 20{. (#~ is_super_poulet) 1+i.1e5 |
||
341 1387 2047 2701 3277 4033 4369 4681 5461 7957 8321 10261 13747 14491 15709 18721 19951 23377 31417 31609</lang> |
341 1387 2047 2701 3277 4033 4369 4681 5461 7957 8321 10261 13747 14491 15709 18721 19951 23377 31417 31609</lang> |
||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
<lang ruby>using Primes |
<lang ruby>using Primes |