Paper 5
Paper 5
Paper 5
In[6]:= Log2[2^50]
Out[6]= 50
In[29]:= Tr@Most@Divisors@2305843008139952128
In[40]:= f[(2147483647^2)^2]
In[54]:= ClearAll[f]
f[n_] := f[n] = {#, Log[#, n]} & /@
Quiet@Select[Most@Divisors@n, IntegerQ@Log[#, n] &]
Out[68]= 2305843008139952128
qq = 1;
Monitor[Do[{a, b, cc, d, e, f, g, h, i,
j} = (wes = RandomInteger[18, 10]);
ClearAll[U, W, c, Q, x, y, z, w];
U[x_] := a*Cos[Pi*Log[x]/8] + b;
W[y_] := (Log[y] - cc)^2* (U[y] - d)/e;
c[z_] := f + g/(h*Log[z] - i + Sqrt[Log[z]^2 - j*Log[z]]);
Q[w_] := c[w] ((w - U[w] Sqrt[LogIntegral[w]])/Log[w]) + W[w];
bb = Abs /@ Table[Floor@Q[10^k] - PrimePi[10^k], {k, 4, 13}];
If[And @@
MapThread[#1 >= #2 &, {{3, 2, 25, 47, 29, 216, 18, 1023, 12239,
132613}, bb}], Print[wes, bb]], {qq, 1000000}], qq]
Out[127]= $Aborted
In[299]:=
Select[Permutations@Range[s = #],
And @@ Table[Mod[f = FromDigits@#[[;; k]], k] < 1, {k, s}] &] &[6]
Out[281]= {{0} < 1, {0} < 1, {0} < 1, {3} < 1, {4} < 1, {0} < 1}
{1, 1, 1}
{2, 1}
{1, 1}, 1
{3}
Out[18]= {1, 1, 1}
In[24]:= Select[
Union@Select[Subsets@Subsets[{1, 1, 1}], Total@Flatten@# == 3 &],
FreeQ[#, {}] &]
In[135]:= 2305843008139952128^2
In[141]:= f[2305843008139952128^4]
Out[141]= {{2305843008139952128,
4}, {5316911978187903335626628646131728384, 2}}
In[151]:= Tr@Divisors@2305843008139952128
In[154]:= f[4611686016279904256/2]
Out[154]= {}
Out[155]= {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, \
8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, \
4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, \
536870912, 1073741824, 2147483647, 4294967294, 8589934588, \
17179869176, 34359738352, 68719476704, 137438953408, 274877906816, \
549755813632, 1099511627264, 2199023254528, 4398046509056, \
8796093018112, 17592186036224, 35184372072448, 70368744144896, \
140737488289792, 281474976579584, 562949953159168, 1125899906318336, \
2251799812636672, 4503599625273344, 9007199250546688, \
18014398501093376, 36028797002186752, 72057594004373504, \
144115188008747008, 288230376017494016, 576460752034988032, \
1152921504069976064, 2305843008139952128}
In[144]:= Select[Range@1000,
Tr@IntegerDigits@# == Tr@IntegerDigits@Prime@# &]
Out[144]= {32, 56, 88, 175, 176, 182, 212, 218, 227, 248, 293, 295, \
323, 331, 338, 362, 377, 386, 394, 397, 398, 409, 439, 446, 457, 481, \
499, 508, 563, 571, 595, 599, 635, 637, 655, 671, 728, 751, 752, 755, \
761, 767, 779, 820, 821, 826, 827, 847, 848, 857, 869, 878, 896, 902, \
922, 929, 940, 947, 953, 982}
In[145]:= N[16.25/63]
Out[145]= 0.257937
In[156]:= 2*1073741824
Out[156]= 2147483648
In[157]:= FactorInteger@9890836489141547229675646151234
Out[157]= {{2, 1}, {23, 1}, {37, 1}, {71, 1}, {101, 1}, {131,
1}, {151, 1}, {181, 1}, {191, 1}, {193, 1}, {313, 1}, {353,
1}, {373, 1}, {383, 1}, {389, 1}}
In[168]:= a@15
Out[168]= 7076067152747108404568234696529482
Out[174]= 2166901
69343925/
Out[171]= 69343925/32
In[186]:= v = 2000;
Monitor[Do[
If[Prime@q^5 ==
Prime@w^5 + Prime@r^5 + Prime@t^5 + Prime@y^5 + Prime@u^5,
Print[{q, w, r, t, y, u}]], {w, v}, {r, w + 30, v}, {t, r + 30,
v}, {y, t + 30, v}, {u, y + 30, v}, {q, u + 30, v}], {w, r, t, y}]
Out[187]= $Aborted