-
Notifications
You must be signed in to change notification settings - Fork 0
/
pe30.nb
109 lines (97 loc) · 3.83 KB
/
pe30.nb
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
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 3767, 101]
NotebookOptionsPosition[ 2805, 77]
NotebookOutlinePosition[ 3377, 95]
CellTagsIndexPosition[ 3334, 92]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
"\"\<s(x)=sum of 5th power of all digits then calculate the upper bound of \
digits length:consider a 6 digits number first:s(999999)=354294,this is clear \
that s(x) no long greater than x after x>999999,since every digits \
is'max',which is 9 then try to modify the 1st digits lower,it is super easy \
to find this value:s(299999)=295277 then 299999 is a approximately upper \
bound of x.then the rest is just a loop:\>\"", ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"f", "[", "x_", "]"}], ":=",
RowBox[{
RowBox[{"Total", "[",
RowBox[{
RowBox[{"IntegerDigits", "[", "x", "]"}], "^", "5"}], "]"}], "==",
"x"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Total", "@",
RowBox[{"Select", "[",
RowBox[{
RowBox[{"Range", "[", "229999", "]"}], ",", "f"}], "]"}]}], "-",
"1"}]}], "Input",
CellChangeTimes->{{3.8494347559520645`*^9, 3.849434779093734*^9}, {
3.8494349655158277`*^9, 3.8494349992140093`*^9}, {3.849435033607386*^9,
3.8494350540551205`*^9}},
CellLabel->"In[20]:=",ExpressionUUID->"3be07e7c-9d24-4628-9e90-fe7261b8d7e2"],
Cell[BoxData["443839"], "Output",
CellChangeTimes->{{3.849434776877494*^9, 3.8494347794267287`*^9},
3.8494348439364142`*^9, {3.8494349895592976`*^9, 3.8494349998614645`*^9}, {
3.849435040984508*^9, 3.849435055454049*^9}},
CellLabel->"Out[22]=",ExpressionUUID->"06631851-460a-4ba2-8d37-d8f0a6167462"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"f", "[", "213", "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"IntegerDigits", "[", "213", "]"}], "^", "4"}]}], "Input",
CellChangeTimes->{{3.849434991758075*^9, 3.8494350154373727`*^9}},
CellLabel->"In[15]:=",ExpressionUUID->"4131d0f6-bce1-44b1-a47f-3df8787c6a13"],
Cell[BoxData["98"], "Output",
CellChangeTimes->{{3.8494349938732424`*^9, 3.849435015683139*^9}},
CellLabel->"Out[15]=",ExpressionUUID->"5595ab3d-3fca-43f5-9995-8da780c86a48"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"16", ",", "1", ",", "81"}], "}"}]], "Output",
CellChangeTimes->{{3.8494349938732424`*^9, 3.8494350156861315`*^9}},
CellLabel->"Out[16]=",ExpressionUUID->"7021b935-7aa2-4834-b44c-787f916d9779"]
}, Open ]]
},
WindowSize->{749, 586},
WindowMargins->{{Automatic, 116}, {183, Automatic}},
FrontEndVersion->"12.3 for Microsoft Windows (64-bit) (July 9, 2021)",
StyleDefinitions->FrontEnd`FileName[{$RootDirectory, "C:", "Users", "stary",
"AppData", "Roaming", "Mathematica", "SystemFiles", "FrontEnd",
"StyleSheets"}, "OD.nb", CharacterEncoding -> "UTF-8"],
ExpressionUUID->"8ccd8695-edf3-4465-8f57-26eebd68ed82"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 1148, 26, 349, "Input",ExpressionUUID->"3be07e7c-9d24-4628-9e90-fe7261b8d7e2"],
Cell[1731, 50, 308, 4, 42, "Output",ExpressionUUID->"06631851-460a-4ba2-8d37-d8f0a6167462"]
}, Open ]],
Cell[CellGroupData[{
Cell[2076, 59, 297, 5, 70, "Input",ExpressionUUID->"4131d0f6-bce1-44b1-a47f-3df8787c6a13"],
Cell[2376, 66, 176, 2, 42, "Output",ExpressionUUID->"5595ab3d-3fca-43f5-9995-8da780c86a48"],
Cell[2555, 70, 234, 4, 42, "Output",ExpressionUUID->"7021b935-7aa2-4834-b44c-787f916d9779"]
}, Open ]]
}
]
*)