-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupper-bounds.sf
63 lines (55 loc) · 2.1 KB
/
upper-bounds.sf
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
60
61
62
63
#!/usr/bin/ruby
# a(n) is the smallest integer that has exactly n Lucas divisors (A000032).
# https://oeis.org/A356062
# Known terms:
# 1, 2, 4, 12, 36, 252, 2772, 52668, 1211364, 35129556, 1089016236, 44649665676, 2098534286772, 417608323067628, 88115356167269508, 24760415083002731748, 7948093241643876891108, 4140956578896459860267268
func a(n, tries=1e5) {
var min = Inf
0..(2*n) -> map{.lucas}.uniq.sort.combinations(n, {|*a|
var t = a.lcm
if (t < min) {
min = t
}
break if (--tries <= 0)
})
min
}
for n in (1..35) {
say "a(#{n}) <= #{a(n)}"
}
__END__
a(1) <= 1
a(2) <= 2
a(3) <= 4
a(4) <= 12
a(5) <= 36
a(6) <= 252
a(7) <= 2772
a(8) <= 52668
a(9) <= 1211364
a(10) <= 35129556
a(11) <= 1089016236
a(12) <= 44649665676
a(13) <= 2098534286772
a(14) <= 417608323067628
a(15) <= 88115356167269508
a(16) <= 24760415083002731748
a(17) <= 7948093241643876891108
a(18) <= 4140956578896459860267268
a(19) <= 4567475106522795225874796604
a(20) <= 9870313705195760483115435461244
a(21) <= 21783782347367043386235766062965508
a(22) <= 54916915297712316376700366244736045668
a(23) <= 196108304528130681781197007859952419080428
a(24) <= 1133309891868067210013537508422665029865793412
a(25) <= 10595314179074560346416562166243495364215302608788
a(26) <= 104904205687017221989870382007976847601095711129609988
a(27) <= 1384840419274314347488278912887302365182064482621981451588
a(28) <= 21120201234352568113543741700444248371391665424467839118168588
a(29) <= 1353361374896078212147769424422766991390406528734474662853124950452
a(30) <= 87536767089653234839929874141088991770122884685074555668002974920185812
a(31) <= 5940332551470958169472481189088440070512309077613844422186349881058729388132
a(32) <= 537487229589643766132039570469911146020024237651578257163843123588074893767571492
a(33) <= 54566241035170224781490789233675849455098880630625876245530517749784951290177625439332
a(34) <= 5343180888404903580828359572550772854492737490231516427838593828576692215285483260644828772
a(35) <= 6143861887713266787319070082857078717511328695880199396066634952382738120438228212735717008312972