|
|
Problem 62
1 2 3 4 |
[email protected][Tally[Table[[email protected][i^3], {i, 10000}]], Last] { { {0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9}, 5}, { {0, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9}, 5}, ...} [email protected][Table[i^3, {i, 1000, 10000}], [email protected][#] == {0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9} || [email protected][#] == {0, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9} &] 127035954683 |
Problem 63
1 2 3 4 5 6 |
Reduce[10^((i - 1)/i) <= 9. && i > 0, i, Reals] 0 < i <= 21.8543 s =Table[[email protected] Solve[10^(i - 1) <= x^i < 10^i && x > 0, x, Integers], {i, 21}] {9, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} [email protected] 49 |
Problem 64
1 2 |
Count[Sqrt /@ Range[10000], s_ /; (! [email protected]) && [email protected][([email protected])[[2]]]] 1322 |
Problem 65
1 2 |
[email protected]@[email protected]@Convergents[E, 100] 272 |
Problem 66
1 2 3 4 5 6 7 |
f[d_] :=Module[{n = 1}, If[[email protected]@d, ret = 0, While[True, b = [email protected][[email protected], n]; {x, y} = {[email protected], [email protected]}; If[x^2 == d*y^2 + 1, ret = x; Break[], n++] ]]; ret] Ordering[f /@ Range[1000], -1] {661} |
Problem 67
1
|
See Problem 18. |
Problem 68
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
outer = {1, 4, 6, 8, 10}; seq = { {1, 2, 3}, {4, 3, 5} , {6, 5, 7} , {8, 7, 9} , {10, 9, 2} }; p = Select[[email protected]@10, [email protected]@Table[[email protected]#[[i]], {i, seq}] == 1 && MemberQ[#[[outer]], 10] && Min[#[[outer]]] == 6 &]; In[54]:= f[l_] := Module[{}, sm = Ordering[l[[outer]], 1]; s = RotateLeft[seq, sm - 1]; [email protected][ToString /@ l[[[email protected]]]] ] In[55]:= Max[f /@ p] Out[55]= 6531031914842725 |
Problem 69
1 2 |
Ordering[Table[n/EulerPhi[n],{n,2,1*^6}],-1]+1 {510510} |
Problem 70
1 2 3 4 5 6 |
ps = Table[[email protected], {i, [email protected], [email protected]}]; s =Select[Flatten[{Table[{i, i}, {i, ps}], Subsets[ps, {2}]}, 1], Times @@ # < 1*^7 && [email protected][(#[[1]] - 1) (#[[2]] - 1)] == [email protected][#[[1]]*#[[2]]] &] s[[Ordering[(1 - 1/#) (1 - 1/#2) & @@@ s, -1]]] { {2339, 3557} } 2339*3557 8319823 |
Problem 71
1 2 |
Numerator[Union[Floor[3 #/7]/# & /@ Range[1*^6]][[-2]]] 428570 |
Problem 72
1 2 |
Total[EulerPhi /@ Range[2, 1*^6]] 303963552391 |
Problem 73
1 2 3 |
f[n_]:=Count[Range[Floor[n/3]+1,Ceiling[n/2]-1],a_/;CoprimeQ[n,a]] Total[f /@ Range[4, 12000]] 7295372 |
Problem 74
|
|
Problem 75
|
|
Problem 76
1 2 |
PartitionsP[100]-1 190569291 |
Problem 77
1 2 |
NestWhile[# + 1 &, 2, [email protected][#, All, Array[Prime, PrimePi[1000]]] <= 5000 &] 71 |
Problem 78
1 2 3 4 5 6 7 8 |
Clear[ml, sl, p]; ml[n_] := ml[n] = # (3 # - 1)/2 & /@ [email protected][{1, -1}*i, {i, n}]; sl[n_] := sl[n] = ((-1)^Floor[(# - 1)/2]) & /@ Range[2 n]; p[0] = p[1] = 1; p[k_Integer?Negative] := 0; p[k_] := p[k] = Module[{maxk = Ceiling[(1 + Sqrt[24 k + 1])/6]}, Total[(p /@ (k - ml[maxk]))*sl[maxk]]] NestWhile[# + 1 &, 1, Mod[[email protected]#, 1*^6] != 0 &] 55374 |
Problem 79
1 2 |
[email protected]@Flatten[{DirectedEdge[#[[1]], #[[2]]], DirectedEdge[#[[2]], #[[3]]]} & /@ s] {7, 3, 1, 6, 2, 8, 9, 0} |
Problem 80
1 2 3 |
ps = Select[Range[100], IntegerPart[Sqrt[#]] != Sqrt[#] &]; Total[Take[[email protected]@N[Sqrt[#], 102], 100] & /@ ps, 2] 40886 |
近期评论