How to resolve the algorithm Attractive numbers step by step in the Arturo programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Attractive numbers step by step in the Arturo 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 Arturo programming language
Source code in the arturo programming language
attractive?: function [x] -> prime? size factors.prime x
print select 1..120 => attractive?
You may also check:How to resolve the algorithm CUSIP step by step in the JavaScript programming language
You may also check:How to resolve the algorithm 15 puzzle game step by step in the Mathematica / Wolfram Language programming language
You may also check:How to resolve the algorithm Palindrome detection step by step in the ActionScript programming language
You may also check:How to resolve the algorithm Guess the number step by step in the FreeBASIC programming language
You may also check:How to resolve the algorithm Sorting algorithms/Heapsort step by step in the REXX programming language