How to resolve the algorithm Numbers which are the cube roots of the product of their proper divisors step by step in the J programming language

Published on 12 May 2024 09:40 PM
#J

How to resolve the algorithm Numbers which are the cube roots of the product of their proper divisors step by step in the J programming language

Table of Contents

Problem Statement

Consider the number 24. Its proper divisors are: 1, 2, 3, 4, 6, 8 and 12. Their product is 13,824 and the cube root of this is 24. So 24 satisfies the definition in the task title. Compute and show here the first 50 positive integers which are the cube roots of the product of their proper divisors. Also show the 500th and 5,000th such numbers. Compute and show the 50,000th such number. OEIS considers 1 to be the first number in this sequence even though, strictly speaking, it has no proper divisors. Please therefore do likewise.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Numbers which are the cube roots of the product of their proper divisors step by step in the J programming language

Source code in the j programming language

F=: 1 8 e.~_ */@:>:@q:"0 ]


   N=: 1+I.F 1+i.2^18
   5 10$N
  1  24  30  40  42  54  56  66  70  78
 88 102 104 105 110 114 128 130 135 136
138 152 154 165 170 174 182 184 186 189
190 195 222 230 231 232 238 246 248 250
255 258 266 273 282 285 286 290 296 297
   499{N
2526
   4999{N
23118
   49999{N
223735


  

You may also check:How to resolve the algorithm Mandelbrot set step by step in the F# programming language
You may also check:How to resolve the algorithm Remove lines from a file step by step in the PureBasic programming language
You may also check:How to resolve the algorithm Mutual recursion step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Word wrap step by step in the Ada programming language
You may also check:How to resolve the algorithm Colour bars/Display step by step in the Icon and Unicon programming language