How to resolve the algorithm Sequence of non-squares step by step in the BQN programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Sequence of non-squares step by step in the BQN programming language
Table of Contents
Problem Statement
Show that the following remarkable formula gives the sequence of non-square natural numbers:
This is sequence A000037 in the OEIS database.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Sequence of non-squares step by step in the BQN programming language
Source code in the bqn programming language
NonSquare ← +⟜(⌊0.5+√)
IsSquare ← =⟜⌊√
NonSquare 1+↕22
⟨ 2 3 5 6 7 8 10 11 12 13 14 15 17 18 19 20 21 22 23 24 26 27 ⟩
+´ IsSquare NonSquare 1+↕1e6
0
You may also check:How to resolve the algorithm McNuggets problem step by step in the jq programming language
You may also check:How to resolve the algorithm Hello world/Graphical step by step in the Slope programming language
You may also check:How to resolve the algorithm Parametric polymorphism step by step in the Icon and Unicon programming language
You may also check:How to resolve the algorithm Euler's identity step by step in the Ada programming language
You may also check:How to resolve the algorithm Literals/Floating point step by step in the Raku programming language