? delta
time = 0 ms.
%901 = [100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
? delta[1]
%902 = 100
# This means that primorial(1593370) would be replaced tentatively by
# primorial(1593370+100) if the vector of arguments to primorial()
# were:
# [1593370, 899, 80, 25, 12, 8, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1,
# 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
# 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
# 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
# 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
#
# the vector of length 100 of the arguments to primorial is
# denoted http://www. With index 1, the current number which is
# highly abundant is n = prod(X=1,100, primorial(www[X])).
# By convention, primorial(0) = 1. Therefore, as the last
# X >0 for which www[X] >0 is X = 28, we can equally write:
# n = prod(X=1,28, primorial(www[X])).
#
# On the other hand, delta[2] through delta[100] are all equal to
# 1. This means that tentatively, primorial(www[X]) would be replaced
# by primorial(www[X]+1) for X = 2, 3, …. 28.
#
# Recall: primorial(m) := prod(X=1, m, prime(X)).
# for X >= 1, prime(X) is the X’th prime.
# prime(1) = 2, prime(2) = 3, prime(3) = 5 and so on.
? delta[1]=500
%903 = 500
# This command changed delta[1] from 100 to 500.
# So primorial(www[1]) will be replaced tentetively
# by primorial(www[1]+500) in the product of
# primorials.
? lastx
%904 = 29
# The PARI/gp code has as a base case:
# n = prod(X=1,28, primorial(www[X])).
# Here, although www has 100 elements, what matters
# is the first 28, i.e.
# [1593370, 899, 80, 25, 12, 8, 6, 4, 4, 3, 3, 2, 2, 2,
# 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] .
#
# lastx := 29. For Y=1, www[1] is tentatively replaced by
# www[1] + 500. For Y=2,… 28, www[Y] is tentatively replaced
# by www[Y] + 1. Each of the 28 cases is tested for a figure of
# merit which, approximately, is proportional to
# sigma(n)/(n log(log(n)) ).
#
# Reference: Wikipedia, Robin’s inequality, in
# the article https://en.wikipedia.org/wiki/Robin%27s_theorem#Robin.27s_theorem
#
# The actual figure of merit is a ratio depending or function of
# n from a related bound given by Jeffrey Lagarias in 2002.
#
# Reference on Lagarias bound: the Wikipedia article on
# Robin’s Theorem, https://en.wikipedia.org/wiki/Robin%27s_theorem#Robin.27s_theorem .
#
# The test case with the best figure of merit “wins the day”.
# It will eventually happen that a 29’th non-trivial primorial
# is required to get best figures of merit. So with
# lastx = 29, the 29’th possibility is replacing
# primorial(www[29]) by primorial(www[29]+1).
# Since www[29] is zero, we’re replacing
# primorial(0) by primorial(1), equivalently
# 1 by 2.
# This is in the product of 28 (or 29) primorials.
# It’s very seldom that an extra non-trivial primorial
# is needed, is the choice that wins the day.
# Most often, the primorial factor represented in www
# by www[1] ~= 1593370 wins the day, i.e. maximises the
# figure of merit among the 29 tentative cases.
#
# Moreover, with n having ~~= 4.7 million digits,
# the increment in the figure of merit is tiny when
# adding an extra prime to primorial(www[1]), thus
# changing it to primorial(www[1]+1).
# That is the reason why primorial(www[1]) is tentatively
# replaced by primorial(www[1]+500).
#
? www[lastx]
%905 = 0
# This is the same as saying www[29] = 0.
# That www[lastx] is indeed zero confirms that
# the full range of candidates is being tested.
? dimo = www[1]+ delta[1]+5
%906 = 1591375
### This technicality is necessary because
### delta[1] was changed from 100 to 500.
# For the record, the current command line is reproduced below,
# with the output.
# The sigma() function is multiplicative. Therefore, each prime factor
# can be treated separately. In paractice, it always amoounts
# to replacing primorial(www[X]) by primorial(www[X]+1).
#
# So, n gets multiplied by: prime(www[X]+1)
# for some X between 1 and 29.
# My current idea is to write:
#
# test_sigma(k) = base_sigma*[sigma(prime(www[k]+1)^(old+1))/sigma(prime(www[k]+1)^old)]
#
# k = 1 … 29. www[k] codes for the primorial to be changed tentatively.
# Tentatively, primorial(www[k]) gets replaced by primorial(www[k]+1).
# So we multiply tentatively by prime(www[k]+1). The exponent of
# prime(www[k]+1) in n is denoted ‘old’. This exponent is incremented by 1
# to ‘old+1’. The base value of sigma at n gets multiplied by:
# [sigma(prime(www[k]+1)^(old+1))/sigma(prime(www[k]+1)^old)].
#
# This could very well save some arithmetic over the current
# command-line and the function ratiott(.)
? for(YYY = 1, niter , for(ZZZZ=1,5, thebest = 0; www3=vector(100);for(Y=1,100,www3[Y]=www[Y]);stdwww3=vector(dimo);for(Y=1,dimo, stdwww3[Y] = sum(Z=1,30, www3[Z] > (Y-1)));for(Y= ymini+1,yleste , stdwww3[Y] = 0); cst=ratiott(stdwww3); cst=cst-0.00008; for(WW = 1, 1 , for(X=1, lastx , www2=vector(100);for(Y=1,100,www2[Y]=www[Y]);www2[X]=www2[X]+delta[X]; stdwww2=vector(dimo);for(Y=1,dimo, stdwww2[Y] = sum(Z=1,30,www2[Z] > (Y-1))); for(Y=ymini+1,yleste,stdwww2[Y]=0); newr2 = ratiott(stdwww2); if(newr2> cst , print(X,” “, newr2)); if(newr2>cst, cst=newr2; thebest = X) ) ) ; print(“Best: “,thebest,” Score: “,cst); if(thebest>0, www[thebest]=www[thebest]+delta[thebest] ; if(thebest<2, kol = yleste+ delta[1]; sigcpp78k = sigcpp68k*prod(X=yleste+1, kol , 1+prime(X));cpp78k = cpp68k*prod(X= yleste+1 , kol , prime(X));yleste = kol ; sigcpp68k = sigcpp78k; cpp68k = cpp78k) ); dimo = www[1]+ delta[1]+5 ; ) ; print(www) )
1 9999.9087150422545096369440784390829406
Best: 1 Score: 9999.9087150422545096369440784390829406
1 9999.9087154409768643237359949738553807
Best: 1 Score: 9999.9087154409768643237359949738553807
1 9999.9087171023379567548048198298286004
Best: 1 Score: 9999.9087171023379567548048198298286004
1 9999.9087208742006735711827449690897525
Best: 1 Score: 9999.9087208742006735711827449690897525
1 9999.9087268026985978387033212055799322
Best: 1 Score: 9999.9087268026985978387033212055799322
[1593370, 899, 80, 25, 12, 8, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1 9999.9087350808694455271852941544078714
Best: 1 Score: 9999.9087350808694455271852941544078714
1 9999.9087431797591091745405392129254831
Best: 1 Score: 9999.9087431797591091745405392129254831
1 9999.9087498908856025836078002227582988
Best: 1 Score: 9999.9087498908856025836078002227582988
1 9999.9087555468150157032071295947936963
Best: 1 Score: 9999.9087555468150157032071295947936963
1 9999.9087582838941420472062574825750705
Best: 1 Score: 9999.9087582838941420472062574825750705
[1595870, 899, 80, 25, 12, 8, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1 9999.9087591610390656116162973208236569
Best: 1 Score: 9999.9087591610390656116162973208236569
1 9999.9087613569404360468140355438192008
Best: 1 Score: 9999.9087613569404360468140355438192008
1 9999.9087653953633708648015724280148535
Best: 1 Score: 9999.9087653953633708648015724280148535
1 9999.9087712396008535663820624516728283
Best: 1 Score: 9999.9087712396008535663820624516728283
1 9999.9087772873918208153172838071541203
Best: 1 Score: 9999.9087772873918208153172838071541203
[1598370, 899, 80, 25, 12, 8, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1 9999.9087826322306277573017171509598310
Best: 1 Score: 9999.9087826322306277573017171509598310
1 9999.9087865097269696277753160341030061