The Negative Digital Root Implemented as a Mathematica Standalone Function

Published: 18 December 2024| Version 1 | DOI: 10.17632/dg5srz9vjd.1
Contributor:
Paul F Marrero Romero

Description

This is a new standalone function developed using Mathematica, which is capable of compute the Negative Digital Root of any negative integer. This standalone function is suitable for its inmediate use in any Wolfram Language Computation. ◼ Usage: NegativeDigitalRoot[n] gives the Negative Digital Root for the negative integer n. ◼ Details & Options: Consider a negative integer n, when n < 0 the negative digital root of n is: * NegativeDigitalRoot[n] = n - (-9) * Floor[(n+1) / -9], As an example, consider n = -476: * NegativeDigitalRoot[-476] = (-476) - (-9) * Floor[(-476 + 1) / -9] = -8. * NegativeDigitalRoot[-476] returns -8. For any negative integer n: * 0 > NegativeDigitalRoot[n] >= - 9. -> Note 1: Standalone function developed on Mathematica 14.0+. -> Note 2: More mathematical and coding details, graphics and technical information can be found in the notebook (.nb), package (.wl) & pdf files provided in this data pack.

Files

Steps to reproduce

1) Create a new Notebook. 2) Define the standalone function for the Negative Digital Root. We have named our new function as "NegativeDigitalRoot". 3) Introduce the restrictions for the argument of the function NegativeDigitalRoot[n_?] in order to produce an error message when the user input a integer that is not a negative integer. 4) Use the general formula for the Negative Digital Root in the right side of the standalone function, i.e., NegativeDigitalRoot[] := n - (-9)*Floor[(n + 1) / -9] 5) Write the correspondent error message when the user input something different from a negative integer. In this case we used the following error message: "The provided input is not a negative integer." 6) Set the attributes for the function. In this case we used: Attributes[NegativeDigitalRoot] = {Listable}. 7) Create a Wolfram Language Package file (.wl) for the "NegativeDigitalRoot" function. This will make installation and reproduction easier. Acknowledgements: All these analyses and calculations were carried out in the Marrero Research laboratory.

Institutions

Universidad de Carabobo

Categories

Mathematics, Number Theory, Discrete Mathematics, Algorithms, Functional Programming, Computer Program, Root, Mathematical Function, Symbolic Computation, Science, Technology, Engineering and Mathematics

Licence