Inconsummate numbers in base 10: Difference between revisions

J
(→‎{{header|Python}}: correct the max search point)
(J)
Line 201:
</pre>
 
=={{header|J}}==
With:
<syntaxhighlight lang=J>dsum=: [: +/"(1) 10&#.inv NB. digital sum
incons=: (-. (% dsum))&(1+i.) (90* 10 >.&.^. ]) NB. exclude many digital sum ratios</syntaxhighlight>
We get:
<syntaxhighlight lang=J> 5 10$incons 1000
62 63 65 75 84 95 161 173 195 216
261 266 272 276 326 371 372 377 381 383
386 387 395 411 416 422 426 431 432 438
441 443 461 466 471 476 482 483 486 488
491 492 493 494 497 498 516 521 522 527
999 { incons 10000
6996
9999 { incons 100000
59853
99999 { incons 1000000
536081</syntaxhighlight>
=={{header|Pascal}}==
==={{header|Free Pascal}}===
6,951

edits