How to resolve the algorithm Quad-power prime seeds step by step in the Arturo programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Quad-power prime seeds step by step in the Arturo programming language

Table of Contents

Problem Statement

Generate the sequence of quad-power prime seeds: positive integers n such that:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Quad-power prime seeds step by step in the Arturo programming language

Source code in the arturo programming language

quadPowerPrime?: function [n]->
    every? [[n+n+1] [1+n+n^2] [1+n+n^3] [1+n+n^4]] 'x ->
        prime? do x

first50qpps: select.first:50 1..=> quadPowerPrime?

loop split.every: 10 first50qpps 'x ->
    print map x 's -> pad to :string s 7


  

You may also check:How to resolve the algorithm UTF-8 encode and decode step by step in the V (Vlang) programming language
You may also check:How to resolve the algorithm Roman numerals/Encode step by step in the Eiffel programming language
You may also check:How to resolve the algorithm Numbers which are not the sum of distinct squares step by step in the Java programming language
You may also check:How to resolve the algorithm Law of cosines - triples step by step in the Ruby programming language
You may also check:How to resolve the algorithm Stable marriage problem step by step in the F# programming language