-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate.pl
59 lines (50 loc) · 2.18 KB
/
generate.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/perl
# Poulet numbers (Fermat pseudoprimes to base 2) k that have an abundancy index sigma(k)/k that is larger than the abundancy index of all smaller Poulet numbers.
# https://oeis.org/A328691
# Known terms:
# 341, 561, 645, 18705, 2113665, 2882265, 81722145, 9234602385, 19154790699045, 43913624518905, 56123513337585, 162522591775545, 221776809518265, 3274782926266545, 4788772759754985
use 5.014;
use ntheory qw(:all);
use Math::AnyNum;
use Math::Prime::Util::GMP;
my $prod = Math::GMPz->new("39021274060472705"); #vecprod(3, 5, 17, 23, 29, 43, 89, 127, 53, 1093);
my $from = int(~0 / $prod);
forsquarefree {
my $psp = Math::Prime::Util::GMP::mulint($prod, $_);
if ($_ > 1 and Math::Prime::Util::GMP::is_pseudoprime($psp, 2)) {
say $psp, "\t-> ", (Math::AnyNum->new(divisor_sum($psp)) / $psp)->float;
}
} $from, $from + 1e7;
__END__
1.0001 record: 1002127890483217
1.0055 record: 1002916662127381
1.4794 record: 1003835815663681
1.4959 record: 1306854803455201
1.6347 record: 1335393695093185
1.7476 record: 1790954650440865
1.8740 record: 1803741273816945
1.8849 record: 1914023821774065
1.9027 record: 44445311134962585
1.9067 record: 136836291472769505
1.9081 record: 2790959548188872985
1.9209 record: 3486467789908607505
1.9270 record: 6686415419518378545
1.9304 record: 6967562024635331505
1.9452 record: 38353281032877674865
1.9452 record: 2638294879881771254145
1.9454 record: 24773130788808935997465
1.9454 record: 429388072625313108651345
1.9459 record: 633708839387221385771985
1.9594 record: 4426632427184293146004185
1.9786 record: 30289748358904212366572385
1.9814 record: 728017010426459878356936705
1.9842 record: 34742187522900518220477982065
1.9856 record: 296874628838164374175009735905
1.9888 record: 282385466973939051351462060010785
1.9893 record: 303874597856107607075523212740305
1.9967 record: 95232935093163427870007414104051665
2.0027 record: 3470207934739664512679701940114447720865
2.0027 record: 35681625351759414447784656906886402710161726145
2.0036 record: 18324199296528369643710689094829325758885303308048705
2.0036 record: 3521782835397676946933688469202532605577443098683804760065
2.0075 record: 4480869812756224982980361246336523683775981809514868335105