2016年12月25日日曜日

161225(3)

Ruby


Sierpinski number

78557 の場合で素因数分解してみた。

require 'prime'

(1..50).each{|i|
  j = 78557 * 2 ** i + 1
  p [j, j.prime_division]
}

出力結果
[157115, [[5, 1], [7, 1], [67, 2]]]
[314229, [[3, 1], [104743, 1]]]
[628457, [[73, 1], [8609, 1]]]
[1256913, [[3, 2], [7, 1], [71, 1], [281, 1]]]
[2513825, [[5, 2], [193, 1], [521, 1]]]
[5027649, [[3, 1], [11, 1], [131, 1], [1163, 1]]]
[10055297, [[7, 1], [1436471, 1]]]
[20110593, [[3, 1], [541, 1], [12391, 1]]]
[40221185, [[5, 1], [59, 1], [136343, 1]]]
[80442369, [[3, 3], [7, 2], [41, 1], [1483, 1]]]
[160884737, [[13, 1], [523, 1], [23663, 1]]]
[321769473, [[3, 1], [43, 1], [47, 1], [73, 1], [727, 1]]]
[643538945, [[5, 1], [7, 1], [1759, 1], [10453, 1]]]
[1287077889, [[3, 1], [353, 1], [599, 1], [2029, 1]]]
[2574155777, [[19, 1], [135481883, 1]]]
[5148311553, [[3, 2], [7, 1], [11, 1], [7429021, 1]]]
[10296623105, [[5, 1], [2059324621, 1]]]
[20593246209, [[3, 1], [6864415403, 1]]]
[41186492417, [[7, 1], [1583, 1], [3716857, 1]]]
[82372984833, [[3, 1], [53, 1], [173, 1], [311, 1], [9629, 1]]]
[164745969665, [[5, 1], [73, 1], [451358821, 1]]]
[329491939329, [[3, 2], [7, 1], [101, 1], [51782483, 1]]]
[658983878657, [[13, 1], [811, 1], [62504399, 1]]]
[1317967757313, [[3, 1], [439322585771, 1]]]
[2635935514625, [[5, 3], [7, 1], [47563, 1], [63337, 1]]]
[5271871029249, [[3, 1], [11, 1], [29, 1], [43, 1], [128110399, 1]]]
[10543742058497, [[37, 1], [167, 1], [40427, 1], [42209, 1]]]
[21087484116993, [[3, 3], [7, 1], [1873, 1], [59569669, 1]]]
[42174968233985, [[5, 1], [75659, 1], [111486983, 1]]]
[84349936467969, [[3, 1], [41, 1], [73, 1], [859, 1], [10936129, 1]]]
[168699872935937, [[7, 2], [109, 1], [31585821557, 1]]]
[337399745871873, [[3, 1], [463, 2], [524640139, 1]]]
[674799491743745, [[5, 1], [19, 1], [541301, 1], [13122371, 1]]]
[1349598983487489, [[3, 2], [7, 1], [181, 1], [1579, 1], [1861, 1], [40277, 1]]]
[2699197966974977, [[13, 1], [47, 1], [47119, 1], [93755653, 1]]]
[5398395933949953, [[3, 1], [11, 1], [163587755574241, 1]]]
[10796791867899905, [[5, 1], [7, 1], [73597, 1], [4191472039, 1]]]
[21593583735799809, [[3, 1], [55312471, 1], [130130893, 1]]]
[43187167471599617, [[71, 1], [73, 1], [211, 1], [39490356709, 1]]]
[86374334943199233, [[3, 2], [7, 1], [43, 1], [1617437, 1], [19712801, 1]]]
[172748669886398465, [[5, 1], [25499809, 1], [1354901677, 1]]]
[345497339772796929, [[3, 1], [298672481, 1], [385592203, 1]]]
[690994679545593857, [[7, 1], [48844391, 1], [2020979761, 1]]]
[1381989359091187713, [[3, 1], [1301, 1], [354083873710271, 1]]]
[2763978718182375425, [[5, 2], [61, 1], [1812445061103197, 1]]]
[5527957436364750849, [[3, 6], [7, 1], [11, 3], [103, 1], [3433, 1], [2301707, 1]]]
[11055914872729501697, [[13, 2], [20441, 1], [87583, 1], [36541471, 1]]]
[22111829745459003393, [[3, 1], [73, 1], [352489, 1], [286440879323, 1]]]
[44223659490918006785, [[5, 1], [7, 1], [1263533128311943051, 1]]]
[88447318981836013569, [[3, 1], [41, 1], [464591, 1], [1547778355933, 1]]]

0 件のコメント:

コメントを投稿

注: コメントを投稿できるのは、このブログのメンバーだけです。