C#,十进制展开数(Decimal Expansion Number)的算法与源代码

1 十进制展开数

十进制展开数(Decimal Expansion Number)的计算公式:

DEN = n^3 - n - 1

The decimal expansion of a number is its representation in base -10 (i .e ., in the decimal system ). In this system , each "decimal place " consists of a digit 0-9 arranged such that each digit is multiplied by a power of 10, decreasing from left to right , and with a decimal place indicating the s place.

2 计算结果

3 源程序

using System;

namespace Legalsoft.Truffer.Algorithm

{

public static partial class Number_Sequence

{

public static int Decimal_Expansion_Number(int n)

{

return n * n * n - n - 1;

}

}

}

The decimal expansion of a number is its representation in base-10 (i.e., in the decimal system). In this system, each "decimal place" consists of a digit 0-9 arranged such that each digit is multiplied by a power of 10, decreasing from left to right, and with a decimal place indicating the s place. For example, the number with decimal expansion 1234.56 is defined as

Expressions written in this form (where negative are allowed as exemplified above but usually not considered in elementary education contexts) are said to be in expanded notation.

Other examples include the decimal expansion of given by 625, of given by 3.14159..., and of given by 0.1111.... The decimal expansion of a number can be found in the Wolfram Language using the command RealDigits[n ], or equivalently, RealDigits[n, 10].

The decimal expansion of a number may terminate (in which case the number is called a regular number or finite decimal, e.g., ), eventually become periodic (in which case the number is called a repeating decimal, e.g., ), or continue infinitely without repeating (in which case the number is called irrational).

The following table summarizes the decimal expansions of the first few unit fractions. As usual, the repeating portion of a decimal expansion is conventionally denoted with a vinculum.

4 代码格式

cs 复制代码
using System;

namespace Legalsoft.Truffer.Algorithm
{
    public static partial class Number_Sequence
    {
        public static int Decimal_Expansion_Number(int n)
        {
            return n * n * n - n - 1;
        }
    }
}
相关推荐
晨星shine10 小时前
GC、Dispose、Unmanaged Resource 和 Managed Resource
后端·c#
会员源码网13 小时前
使用`mysql_*`废弃函数(PHP7+完全移除,导致代码无法运行)
后端·算法
木心月转码ing14 小时前
Hot100-Day10-T438T438找到字符串中所有字母异位词
算法
HelloReader14 小时前
Wi-Fi CSI 感知技术用无线信号“看见“室内的人
算法
颜酱17 小时前
二叉树分解问题思路解题模式
javascript·后端·算法
用户2986985301418 小时前
.NET 文档自动化:Spire.Doc 设置奇偶页页眉/页脚的最佳实践
后端·c#·.net
用户36674625267418 小时前
接口文档汇总 - 2.设备状态管理
c#
qianpeng89718 小时前
水声匹配场定位原理及实验
算法
用户36674625267418 小时前
接口文档汇总 - 3.PLC通信管理
c#
董董灿是个攻城狮1 天前
AI视觉连载8:传统 CV 之边缘检测
算法