Multiplicatively perfect numbers: Difference between revisions
m
→{{header|J}}: easier to read
m (→{{header|ALGOL 68}}: fix comment) |
m (→{{header|J}}: easier to read) |
||
Line 325:
For the stretch goal, we need to determine the number of semi-primes, given the number of multiplicatively perfect numbers less than N:
<syntaxhighlight lang=J>adjSemiPrime=: + _1 + %: -&(p:inv) 3&%:</syntaxhighlight>
Thus (first number in following results is count of multiplicatively perfect numbers, second is count of semiprimes):
<syntaxhighlight lang=J> {{ (,
150 153
{{ (,
1354 1365
{{ (,
12074 12110
{{ (,
108223 108326</syntaxhighlight>
|