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;
        }
    }
}
相关推荐
William_cl2 分钟前
【C# MVC 前置】异步编程 async/await:从 “卡界面” 到 “秒响应” 的 Action 优化指南(附微软官方避坑清单)
microsoft·c#·mvc
一个很帅的帅哥6 分钟前
JavaScript事件循环
开发语言·前端·javascript
驰羽6 分钟前
[GO]gin框架:ShouldBindJSON与其他常见绑定方法
开发语言·golang·gin
程序员大雄学编程12 分钟前
「用Python来学微积分」5. 曲线的极坐标方程
开发语言·python·微积分
yong999018 分钟前
C#驱动斑马打印机实现包装自动打印
java·数据库·c#
坚持编程的菜鸟44 分钟前
LeetCode每日一题——三角形的最大周长
算法·leetcode·职场和发展
Jose_lz1 小时前
C#开发学习杂笔(更新中)
开发语言·学习·c#
一位代码1 小时前
python | requests爬虫如何正确获取网页编码?
开发语言·爬虫·python
看到我,请让我去学习1 小时前
Qt 控件 QSS 样式大全(通用属性篇)
开发语言·c++·qt
筱砚.2 小时前
【STL——vector容器】
开发语言·c++