假的ProjectEuler -翻轉數列 - 拼圖

By Dorothy
at 2012-02-08T18:58
at 2012-02-08T18:58
Table of Contents
如果一個數被轉180度後變成另一數,稱為「翻轉數」。例如169 <-> 691, 但
146 就非翻轉數。特別允許翻過來時0在首位,然後將其移除取值。
於是全由1,6,8,9,0組成的數就是翻轉數,記作rev(x)
例如 rev(1680) := 0891 := 891
定義數列 <a(n)>, a(1)=1
{ rev (a(n)) , 若rev(a(n)) 在前面不曾出現
a(n+1) = {
{ a(n) + 1
根據定義, <a(n)> 的前幾項是:
1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 91, 92, 93, 94, 95,
96, 97, 98, 86, 87, 88, 89, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, 79, 80, 8, 9, 10, 11, 12, 13, ...
已知 a(10000) = 5168,求 a(1,000,000)
: 我還沒算出來 (遭毆打)
: 又,題目是睡前數羊時想出來的 (再遭毆打)
--
Tags:
拼圖
All Comments

By Emily
at 2012-02-10T14:23
at 2012-02-10T14:23

By Caroline
at 2012-02-13T09:04
at 2012-02-13T09:04

By Zora
at 2012-02-17T18:02
at 2012-02-17T18:02

By Yedda
at 2012-02-18T13:02
at 2012-02-18T13:02

By Bethany
at 2012-02-18T17:50
at 2012-02-18T17:50

By Mia
at 2012-02-22T12:26
at 2012-02-22T12:26
Related Posts
ProjectEuler 370 Geometric triangles

By Olivia
at 2012-02-05T15:16
at 2012-02-05T15:16
益智-5x5格相乘遊戲

By David
at 2012-02-04T23:36
at 2012-02-04T23:36
雷諾瓦拼圖拼圖分離

By Thomas
at 2012-02-04T01:59
at 2012-02-04T01:59
益智-MATCH 10

By Susan
at 2012-01-30T20:30
at 2012-01-30T20:30
ProjectEuler 369 Badugi

By Callum
at 2012-01-30T12:28
at 2012-01-30T12:28