How to resolve the algorithm Attractive numbers step by step in the Quackery programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Attractive numbers step by step in the Quackery programming language
Table of Contents
Problem Statement
A number is an attractive number if the number of its prime factors (whether distinct or not) is also prime.
The number 20, whose prime decomposition is 2 × 2 × 5, is an attractive number because the number of its prime factors (3) is also prime.
Show sequence items up to 120.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Attractive numbers step by step in the Quackery programming language
Source code in the quackery programming language
[ primefactors size
primefactors size 1 = ] is attractive ( n --> b )
120 times
[ i^ 1+ attractive if
[ i^ 1+ echo sp ] ]
You may also check:How to resolve the algorithm Averages/Mode step by step in the ActionScript programming language
You may also check:How to resolve the algorithm Show the epoch step by step in the Ada programming language
You may also check:How to resolve the algorithm Periodic table step by step in the J programming language
You may also check:How to resolve the algorithm Special variables step by step in the Mathematica/Wolfram Language programming language
You may also check:How to resolve the algorithm Nth root step by step in the RATFOR programming language