How to resolve the algorithm Attractive numbers step by step in the Delphi programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Attractive numbers step by step in the Delphi 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: