I've got a faster version in Java that does 1e6 in 9m30s. I think it can go much further, but the file gets too big. (It uses doubles and sums of logs to approximate the value, and only checks the bigints if the doubles seem to say the new value is close to or greater than the old value.) A simple table of the last prime power factor would enable anyone to recalculate the result just by walking the table backwards---assuming the previous value is not later improved. But this is easily checked. About 66% of the values (the full bigint values) are repeats of the previous value so omitting the duplicates can improve the size of the output. For instance, the values for 65531 through 65536 are all the same. Probably a table of last prime power factors coupled with a bit of JavaScript in a web page to do the bigint arithmetic would be most useful . . . On Tue, Nov 15, 2016 at 4:23 AM, Joerg Arndt <arndt@jjj.de> wrote:
Computation of the values for n <= 10^6 took 15 hours. The resulting file is 1,061.3 MiB, and 182.7 MiB after compression using xz -9
Should I put it online? Or even better: does anybody have/know a web server where this file could be offered?
Best regards, jj
* Joerg Arndt <arndt@jjj.de> [Nov 14. 2016 12:16]:
Here is a Pari/GP version (omitting a(0)): -------------------------- { \\ compute all terms for n = 1 .. N my( N = 2^16 ); my( V = vector(N,j,1) ); forprime (i=2, N, \\ primes i forstep (j=N, i, -1, my( hi = V[j] ); my( pp = i ); \\ powers of prime i while( pp<=j, \\ V[] is 1-based if ( j-pp == 0, hi = max(hi, 1 * pp) ; , /* else */ hi = max(hi, V[j-pp]*pp) ); pp *= i; ); V[j] = hi; ); ); \\ print( V ); \\ to print all print( V[#V] ); \\ to print just a(N) } \\ translated from code given by Tomas Rokicki, _Joerg Arndt_, Nov 14 2016 --------------------------
[...]
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- -- http://cube20.org/ -- [ <http://golly.sf.net/>Golly link suppressed; ask me why] --