如何表达 h(n),它是两个序列 f(n) 和 g(n) 的“并集”

How to express h(n) which is the "union" of the two sequences f(n) & g(n)

提问人:Harry 提问时间:6/1/2023 更新时间:6/2/2023 访问量:47

问:

我在这里的语法和英语方面都如履薄冰,如果我在这里表达数学的方式是一个疯子的漫无边际,请道歉。

我有两个序列/“函数”f(n) 和 g(n)。从技术上讲,它们不是函数,我只是将它们定义为 9 和 10 的重复模数序列。

n = 0,1,2,3,...
f(n): nMOD9={0,3,4,6}
g(n): nMOD10={0,3,4,5,8,9}

This means that f(n) is will go 0,3,4,6,9,12,13,15,18,ect. Just repeating the four numbers in the brackets of modulus of 9. 

g(n) will be 0,3,4,5,8,9,10,13,14,15,18,19,20,ect. Repeating the six numbers in brackets of modulus of 10.

Now I wonder, can I express h(n) which is the list of numbers that is both present in f(n) and g(n)? This will be 0,3,4,9,13,15,18,ect. Either as a function or as some nMODx={a,b,c}? Or some other genius way I have not thought about. 

目前,我对这两个列表进行了手动检查,我想知道是否可以做得更优雅。

数学 序列

评论

0赞 Damien 6/1/2023
您可以使用 和 序列按升序生成的事实。您创建一个函数,该函数获取下一个值 ,另一个函数获取下一个值 。如果值相等,则将其放入并递增 和 。如果 的值小于 的值,则仅递增等。h(n)g(n)fghfgfgf
0赞 Harry 6/2/2023
是的,如果我不能设法在表达式本身中表达 h(n),这是一个好主意。如果可以将 h(n) 表示为“独立”序列/函数,我更喜欢这样。

答:

1赞 David Chew 6/2/2023 #1

一种可能的解决方案是找到 h(n) 的所有值,直到 90,那么 h(n) 将是那些 nMOD90,所以

h(n): nMOD90={0,3,4,9,13,15,18,24,30,33,39,40,45,48,49,54,58,60,63,69,75,78,84,85}