从自然数列1,2,3,4......中依次划去2的倍数和3的倍数,但保留5下:1,5,7,10,11,13,15,17,19,20,23,25,29......

作者: tihaiku 人气: - 评论: 0
问题 从自然数列1,2,3,4......中依次划去2的倍数和3的倍数,但保留5下:1,5,7,10,11,13,15,17,19,20,23,25,29......在剩下的数列中,第 2005 个数是几?
选项
答案 4297
解析 解析:第 2005 个数满足这样的条件, 设它为 n,则 n-[n/2]-[n/3]+[n/6]+[n/10]+[n/15]-[n/30]=2005, (其中[n/k]表示不超过 n/k 的最大整数,对于正数,相当于取它整数部分。) 首先估计一下范围: n-n/2-n/3+n/6+n/10+n/15-n/30=2005, 解得 n 大概为:4296,将 4296 代入: 4296-[4296/2]-[4296/3]+[4296/6]+[4296/10]+[4296/15]-[4296/30]=4296-2148-1432+716+429+286-143=2004,比 2005 小 1,取 4297, 代入,发现[ ]内的值与 4296 时都一样,所以结果正好是 2005,所以第 2005 个数是 4297.

相关内容:自然,数列,4......,倍数,29......

猜你喜欢

更多 网友评论0 条评论)
暂无评论
错误啦!

错误信息

  • 消息: [程序异常] : MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
  • 文件: /twcms/kongphp/cache/cache_redis.class.php
  • 位置: 第 85 行
    <?php echo 'KongPHP, Road to Jane.'; ?>