Ruby
オンライン整数列大辞典のA001271 を見た(2016年3月6日現在)があまり詳しくなかった。
出力結果
[2, [[2, 1]]]
[11, [[11, 1]]]
[101, [[101, 1]]]
[1001, [[7, 1], [11, 1], [13, 1]]]
[10001, [[73, 1], [137, 1]]]
[100001, [[11, 1], [9091, 1]]]
[1000001, [[101, 1], [9901, 1]]]
[10000001, [[11, 1], [909091, 1]]]
[100000001, [[17, 1], [5882353, 1]]]
[1000000001, [[7, 1], [11, 1], [13, 1], [19, 1], [52579, 1]]]
[10000000001, [[101, 1], [3541, 1], [27961, 1]]]
[100000000001, [[11, 2], [23, 1], [4093, 1], [8779, 1]]]
[1000000000001, [[73, 1], [137, 1], [99990001, 1]]]
[10000000000001, [[11, 1], [859, 1], [1058313049, 1]]]
[100000000000001, [[29, 1], [101, 1], [281, 1], [121499449, 1]]]
[1000000000000001, [[7, 1], [11, 1], [13, 1], [211, 1], [241, 1], [2161, 1], [9091, 1]]]
[10000000000000001, [[353, 1], [449, 1], [641, 1], [1409, 1], [69857, 1]]]
[100000000000000001, [[11, 1], [103, 1], [4013, 1], [21993833369, 1]]]
[1000000000000000001, [[101, 1], [9901, 1], [999999000001, 1]]]
[10000000000000000001, [[11, 1], [909090909090909091, 1]]]
[100000000000000000001, [[73, 1], [137, 1], [1676321, 1], [5964848081, 1]]]
[1000000000000000000001, [[7, 2], [11, 1], [13, 1], [127, 1], [2689, 1], [459691, 1], [909091, 1]]]
[10000000000000000000001, [[89, 1], [101, 1], [1052788969, 1], [1056689261, 1]]]
[100000000000000000000001, [[11, 1], [47, 1], [139, 1], [2531, 1], [549797184491917, 1]]]
[1000000000000000000000001, [[17, 1], [5882353, 1], [9999999900000001, 1]]]
[10000000000000000000000001, [[11, 1], [251, 1], [5051, 1], [9091, 1], [78875943472201, 1]]]
require 'prime'
m = 25
(0..m).each{|i| p [j = 10 ** i + 1, Prime.prime_division(j)]}
出力結果
[2, [[2, 1]]]
[11, [[11, 1]]]
[101, [[101, 1]]]
[1001, [[7, 1], [11, 1], [13, 1]]]
[10001, [[73, 1], [137, 1]]]
[100001, [[11, 1], [9091, 1]]]
[1000001, [[101, 1], [9901, 1]]]
[10000001, [[11, 1], [909091, 1]]]
[100000001, [[17, 1], [5882353, 1]]]
[1000000001, [[7, 1], [11, 1], [13, 1], [19, 1], [52579, 1]]]
[10000000001, [[101, 1], [3541, 1], [27961, 1]]]
[100000000001, [[11, 2], [23, 1], [4093, 1], [8779, 1]]]
[1000000000001, [[73, 1], [137, 1], [99990001, 1]]]
[10000000000001, [[11, 1], [859, 1], [1058313049, 1]]]
[100000000000001, [[29, 1], [101, 1], [281, 1], [121499449, 1]]]
[1000000000000001, [[7, 1], [11, 1], [13, 1], [211, 1], [241, 1], [2161, 1], [9091, 1]]]
[10000000000000001, [[353, 1], [449, 1], [641, 1], [1409, 1], [69857, 1]]]
[100000000000000001, [[11, 1], [103, 1], [4013, 1], [21993833369, 1]]]
[1000000000000000001, [[101, 1], [9901, 1], [999999000001, 1]]]
[10000000000000000001, [[11, 1], [909090909090909091, 1]]]
[100000000000000000001, [[73, 1], [137, 1], [1676321, 1], [5964848081, 1]]]
[1000000000000000000001, [[7, 2], [11, 1], [13, 1], [127, 1], [2689, 1], [459691, 1], [909091, 1]]]
[10000000000000000000001, [[89, 1], [101, 1], [1052788969, 1], [1056689261, 1]]]
[100000000000000000000001, [[11, 1], [47, 1], [139, 1], [2531, 1], [549797184491917, 1]]]
[1000000000000000000000001, [[17, 1], [5882353, 1], [9999999900000001, 1]]]
[10000000000000000000000001, [[11, 1], [251, 1], [5051, 1], [9091, 1], [78875943472201, 1]]]
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。