我试图提高我的性能技能(不存在),但是在将公式写入代码时遇到了问题。这是我要尝试的公式-用引号引起来-将“转换”为代码。
考虑一个序列u,其中u的定义如下:
该数字
u(0) = 1是中的第一个u。对于每一个x在u,再y = 2 * x + 1而z = 3 * x + 1必须是u也。中没有其他数字u。例如:u = [1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, ...]
1给人3和4,然后3给出了7和10,4给人9和13,然后7给出了15和22等...
这就是我到目前为止所拥有的:
using System;
using System.Collections.Generic;
public class Program …Run Code Online (Sandbox Code Playgroud)