-
Notifications
You must be signed in to change notification settings - Fork 0
/
upper-bounds.sf
120 lines (95 loc) · 4 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/ruby
# a(n) is the first prime p such that, with q the next prime, p + q^2 is 10^n times a prime.
# https://oeis.org/A352848
# Known terms:
# 2, 409, 25819, 101119, 3796711, 4160119, 264073519, 2310648079, 165231073519, 9671986711
# Formulas generated by WolframAlpha, using the following input:
#
# p + (p+c)^2 = 10^n * t
#
# where n is fixed and c = {10, 22, 40, 52, 60, 70}
# Best known upper-bounds:
# a(10) <= 18300671986711
# a(11) <= 154590671986711
# a(12) <= 2237199609971479
# a(13) <= 2735490671986711
# a(14) <= 193086838131073519
# a(15) <= 1529978199609971479
# New bounds:
# a(16) <= 3288779373987568759
# a(17) <= 440765472066701060119
# a(18) <= 3895482305490671986711
# Found upper-bounds:
# a(10) <= 18300671986711
# a(10) <= 47376701060119
# a(10) <= 38101620648079
# a(10) <= 568108131073519
# a(10) <= 183429609971479
# a(10) <= 72453225058471
# a(10) <= 94002233925799
# a(10) <= 49503987568759
# a(11) <= 154590671986711
# a(11) <= 399966701060119
# a(11) <= 2544331620648079
# a(11) <= 3647938131073519
# a(11) <= 281499609971479
# a(11) <= 333732233925799
# a(11) <= 422073987568759
# a(12) <= 2237199609971479
# a(12) <= 7455066701060119
# a(12) <= 5166631620648079
# a(12) <= 17744490671986711
# a(12) <= 44805838131073519
# a(13) <= 2735490671986711
# a(13) <= 5763631620648079
# a(13) <= 274662066701060119
# a(13) <= 374016838131073519
# a(13) <= 196748199609971479
# a(14) <= 236133631620648079
# a(14) <= 980772066701060119
# a(14) <= 193086838131073519
# a(14) <= 3040205490671986711
# a(14) <= 876878199609971479
# a(15) <= 1529978199609971479
var expr = "
p = 1000000000 n + 987568759, t = 1000000000 n^2 + 1975137659 n + 975292193, n element Z
"
var (p1, p2, t1, _, t2, t3) = expr.scan(/(\d+)/).map{.to_i}...
say [p1, p2, t1, t2, t3]
var seen = Set()
for n in (0..1e7) {
var p = (p1*n + p2)
p.is_prime || next
#var t = (t1*n*n + t2*n + t3)
var t = (p + p.next_prime**2).remdiv(10)
if (t.is_prime) {
#say [n, p, t, p**2 + next_prime(p) -> factor]
var t = (p + p.next_prime**2)
var v = valuation(t, 10)
if (!seen.has(v) && is_prime(t / 10**v)) {
seen << v
say "a(#{v}) <= #{p}"
}
}
}
__END__
p = 1000000000 n + 233925799, t = 1000000000 n^2 + 467851703 n + 54721304, n element Z
p = 1000000000 n + 225058471, t = 1000000000 n^2 + 450117047 n + 50651339, n element Z
p = 1000000000 n + 609971479, t = 1000000000 n^2 + 1219943079 n + 372065279, n element Z
p = 1000000000000 n + 199609971479, t = 1000000000000 n^2 + 399219943079 n + 39844140738, n element Z
p = 1000000000000 n + 838131073519, t = 1000000000000 n^2 + 1676262147119 n + 702463696466, n element Z
p = 1000000000000 n + 490671986711, t = 1000000000000 n^2 + 981343973467 n + 240758998565, n element Z
p = 1000000000000 n + 66701060119, t = 1000000000000 n^2 + 133402120283 n + 4449031424, n element Z
p = 1000000000000 n + 631620648079, t = 1000000000000 n^2 + 1263241296179 n + 398944643093, n element Z
p = 10000000000 n + 6701060119, t = 10000000000 n^2 + 13402120283 n + 4490420702, n element Z
p = 10000000000 n + 671986711, t = 10000000000 n^2 + 1343973467 n + 45156617, n element Z
p = 10000000000 n + 1620648079, t = 10000000000 n^2 + 3241296179 n + 262650023, n element Z
p = 10000000000 n + 8131073519, t = 10000000000 n^2 + 16262147119 n + 6611435723, n element Z
p = 1000000000 n + 620648079, t = 1000000000 n^2 + 1241296179 n + 385204051, n element Z
p = 1000000000 n + 671986711, t = 1000000000 n^2 + 1343973467 n + 451566170, n element Z
p = 1000000000 n + 701060119, t = 1000000000 n^2 + 1402120283 n + 491485322, n element Z
p = 100000000 n + 1060119, t = 100000000 n^2 + 2120283 n + 11239, n element Z
p = 100000000 n + 71986711, t = 100000000 n^2 + 143973467 n + 51820898, n element Z
p = 100000000 n + 31073519, t = 100000000 n^2 + 62147119 n + 9655661, n element Z
p = 1000000000 n + 131073519, t = 1000000000 n^2 + 262147119 n + 17180278, n element Z
p = 10000000 n + 1073519, t = 10000000 n^2 + 2147119 n + 115253, n element Z