/r/CasualMath
This is a subreddit that is meant to be somewhere inbetween /r/math and /r/learnmath.
This is a subreddit that is meant to be somewhere inbetween /r/math and /r/learnmath.
It is my hope that crummy mathematicians can discuss old ideas and prove old theorems and solve old puzzles here. Just because someone did it before doesn't mean we can't have fun with it, right?
This is a place where things like the Ulam Spiral and prime-rich polynomials are tolerated as reposts.
Please do use freely available resources where possible. Some crummy mathematicians aren't as fortunate as you are :)
This is our wiki and we encourage contributions of any sort, especially if they're interesting.
Post Spoilers in this format
[X proves Y!](/spoiler)
It will show up like this:
X proves Y!
Using LaTeX
To view LaTeX on reddit, install one of the following:
MathJax Greasemonkey userscript
TeXtheWorld Chrome extension
TeXtheWorld Greasemonkey userscript
[; e^{\pi i} + 1 = 0 ;]
Post the equation above like this:
`[; e^{\pi i} + 1 = 0 ;]`
You may need to add four spaces before or put backticks around math fragments.
Using Superscripts and Subscripts
x*_sub_* makes xsub
x*`sup`* and x^(sup) both make xsup
x*_sub_`sup`* makes xsubsup
Related Subreddits:
IRC channel:
Discord servers:
/r/CasualMath
Question: In a group of 4 children, consisting of 2 boys and 2 girls, only one pair forms a true sibling relationship of a real brother and sister. The other two children are cousins to both of these siblings and to each other. Each child is related either by blood (as siblings) or as cousins, but no other direct family relationship (such as half-sibling or step-sibling) exists.
Considering all possible relationships within the group, determine the following:
made a new youtube channel that solves math problems, please subscribe and support in any way
https://www.youtube.com/@theMathLab00
Pointing to a portrait, a man said, "I do not have a brother, and that man's father is my father's son." Whose picture, was it? Options: (A) His own picture (B) His son (C) His grandfather (D) His niece
I need help. Me and 5 of my friends (6 people) wanna do a drawing game. We all draw something and then pass it to the next 6 times (so the list will have 6 collumns and 6 rows). Is it possible that no one receives the drawing from the same person twice?
If it is, can i have a representation, if not, a reason? Thank you.
I'm looking for:
4 Pythagorean triangles with the same hypotenuse, c, and areas of P, Q, (P-Q), and (P+Q).
I don't know if it's possible, let alone how huge the smallest integer-sided triangles would be if they do exist.
Creating multiple with the same hypotenuse is easy enough, but haven't had any creative spark that might allow me to purposely select numbers that give the (P-Q) and (P+Q) areas. (The obvious pain point.)
Any suggestions?
Cool little thing I did with Euler’s identity
Hello everyone,
Back in high school I was bored in class while learning exponents in my algebra classes. I was curious about exponents and stuff, and I wanted to know if there was some value or expression one could do so that any number x raised to some power b where b is either a number or some sort of expression would equal -x.
x^b = -x
My teacher told me it was impossible at the time, but I wasn't convinced so I did some digging. Eventually I found Euler's Identity (e^iπ = -1), and it reignited my curiosity, but my teacher was still dismissive and said it was impossible. This made me want to try and see if that was really the case, so I started trying to figure out why it worked, but I eventually gave up because I didn't know what I was doing.
Fast forward 3 years and I am now taking calculus courses and far better at math. I was bored at home and the idea popped up in my head so I gave it a shot. I found *kind of* found a solution, but I think my teacher was right.
Here's what I got:
x^((iπ/ln(x)) + 1) = -x x ≠ 0,1
This works (as far as I know) for all real numbers except 0 and 1 because of division by 0, and I was basically just pulling stuff out of my ass. I tried graphing it on my calculator and it showed the same thing as f(x) = -x with the exception of 0 and 1, and looking at table values seemed to suggest it too. I'm pretty sure I just rewrote Euler's Identity in a weird way but it was still fun to mess around with and I am looking forward to learning more math and stuff.
Number | Rule | Examples |
---|---|---|
101 | The difference between 10 times the last digit and the rest of the number is a multiple of 101 | 1,010 is a multiple of 101 because 101 - 0 x 10 = 101 and 101 is a multiple of 101 |
102 | The number is a multiple of 2, 3 and 17 at the same time | 1,020 is a multiple of 102 because it ends in 0, which means it's a multiple of 2, 1 + 2 = 3, which means it's a multiple of 3, and 102 - 0 x 5 = 102, which means it's a multiple of 17 |
103 | The sum of 31 times the last digit and the rest of the number is a multiple 0f 103 | 1,030 is a multiple of 103 because 103 + 0 x 31 = 103 and 103 is a multiple of 103 |
104 | The number is a multiple of 8 and 13 at the same time | 1,040 is a multiple of 104 because it ends in 040, which means it's a multiple of 8, and 104 + 0 x 4 = 104, which means it's a multiple of 13 |
105 | The number is a multiple of 3, 5 and 7 at the same time | 1,050 is a multiple of 105 because 1 + 5 = 6, which means it's a multiple of 3, ends in 0, which means it's a multiple of 5, and 105 - 0 x 2 = 105, which means it's a multiple of 7 |
106 | The number is a multiple of 2 and 53 at the same time | 1,060 is a multiple of 106 because it ends in 0, which means it's a multiple of 2, and 106 + 0 x 16 = 106, which means it's a multiple of 53 |
107 | The difference between 32 times the last digit and the rest of the number is a multiple of 107 | 1,070 is a multiple of 107 because 107 - 0 x 32 = 107 and 107 is a multiple of 107 |
108 | The number is a multiple of 4 and 27 at the same time | 1,080 is a multiple of 108 because it ends in 80, which means it's a multiple of 4, and 108 - 0 x 8 = 108, which means it's a multiple of 27 |
109 | The sum of 11 times the last digit and the rest of the number is a multiple of 109 | 1,090 is a multiple of 109 because 109 + 0 x 11 = 109 and 109 is a multiple of 109 |
110 | The number is a multiple of 10 and 11 at the same time | 1,100 is a multiple of 110 because it ends in 0, which means it's a multiple of 10, and 110 - 0 = 110, which means it's a multiple of 11 |
111 | The number is a multiple of 3 and 37 at the same time | 1,110 is a multiple of 111 because 1 + 1 + 1 = 3, which means it's a multiple of 3, and 111 - 0 x 11 = 111, which means it's a multiple of 37 |
112 | The number is a multiple of 7 and 16 at the same time | 10,080 is a multiple of 112 because 1,008 - 0 x 2 = 1,008, which means it's a multiple of 7, and ends in 0,080, which means it's a multiple of 16 |
113 | The sum of 34 times the last digit and the rest of the number is a multiple of 113 | 1,017 is a multiple of 113 because 101 + 7 x 34 = 339 and 339 is a multiple of 113 |
114 | The number is a multiple of 2, 3 and 19 at the same time | 1,026 is a multiple of 114 because it ends in 6, which means it's a multiple of 2, 1 + 2 + 6 = 9, which means it's a multiple of 3, and 102 + 6 x 2 = 114, which means it's a multiple of 19 |
115 | The number is a multiple of 5 and 23 at the same time | 1,035 is a multiple of 115 because it ends in 5, which means it's a multiple of 5, and 103 + 5 x 7 = 138, which means it's a multiple of 23 |
116 | The number is a multiple of 4 and 29 at the same time | 1,044 is a multiple of 116 because it ends in 44, which means it's a multiple of 4, and 104 + 4 x 3 = 116, which means it's a multiple of 29 |
117 | The number is a multiple of 9 and 13 at the same time | 1,053 is a multiple of 117 because 1 + 5 + 3 = 9, which means it's a multiple of 9, and 105 + 3 x 4 = 117, which means it's a multiple of 13 |
118 | The number is a multiple of 2 and 59 at the same time | 1,062 is a multiple of 118 because it ends in 2, which means it's a multiple of 2, and 106 + 2 x 6 = 118, which means it's a multiple of 59 |
119 | The number is a multiple of 7 and 17 at the same time | 1,071 is a multiple of 119 because 107 - 1 x 2 = 105, which means it's a multiple of 7, and 1,07 - 1 x 5 = 102, which means it's a multiple of 17 |
120 | The number is a multiple of 3 and 40 at the same time | 1,080 is a multiple of 120 because 1 + 8 = 9, which means it's a multiple of 3, and ends in 080, which means it's a multiple of 40 |
121 | The difference between 12 times the last digit and the rest of the number is a multiple of 121 | 1,089 is a multiple of 121 because 108 - 9 x 12 = 0 and 0 is a multiple of 121 |
122 | The number is a multiple of 2 and 61 at the same time | 1,098 is a multiple of 122 because it ends in 8, which means it's a multiple of 2, and 109 - 8 x 6 = 61, which means it's a multiple of 61 |
123 | The number is a multiple of 3 and 41 at the same time | 1,107 is a multiple of 123 because 1 + 1 + 7 = 9, which means it's a multiple of 3, and 110 - 7 x 4 = 82, which means it's a multiple of 41 |
124 | The number is a multiple of 4 and 31 at the same time | 1,116 is a multiple of 124 because it ends in 16, which means it's a multiple of 4, and 111 - 6 x 3 = 93, which means it's a multiple of 31 |
125 | The number ends in 000, 125, 250, 375, 500, 625, 750 or 875 | 1,000 is a multiple of 125 because it ends in 000 |
126 | The number is a multiple of 2, 7 and 9 at the same time | 1,008 is a multiple of 126 because it ends in 8, which means it's a multiple of 2, 100 - 8 x 2 = 84, which means it's a multiple of 7, and 1 + 8 = 9, which means it's a multiple of 9 |
127 | The difference between 38 times the last digit and the rest of the number is a multiple of 127 | 1,016 is a multiple of 127 because 6 x 38 - 101 = 127 and 127 is a multiple of 127 |
128 | The last 7 digits are a multiple of 128; the 1,000,000s digit is even and the last 6 digits are a multiple of 128 or the 1,000,000s digit is odd and the last 6 digits are 64 times an odd number | 10,000,000 is a multiple of 128 because the 1,000,000s digit is 0, an even number, and the last 6 digits are 000,000, a multiple of 128 |
129 | The number is a multiple of 3 and 43 at the same time | 1,032 is a multiple of 129 because 1 + 3 + 2 = 6, which means it's a multiple of 3, and 103 + 2 x 13 = 129, which means it's a multiple of 43 |
130 | The number is a multiple of 10 and 13 at the same time | 1,040 is a multiple of 130 because it ends in 0, which means it's a multiple of 10, and 104 + 0 x 4 = 104, which means it's a multiple of 13 |
131 | The difference between 13 times the last digit and the rest of the number is a multiple of 131 | 1,048 is a multiple of 131 because 104 - 8 x 13 = 0 and 0 is a multiple of 131 |
132 | The number is a multiple of 3, 4 and 11 at the same time | 1,056 is a multiple of 132 because 1 + 5 + 6 = 12, which means it's a multiple of 3, ends in 56, which means it's a multiple of 4, and 105 - 6 = 99, which means it's a multiple of 11 |
133 | The number is a multiple of 7 and 19 at the same time | 1,064 is a multiple of 133 because 106 - 4 x 2 = 98, which means it's a multiple of 7, and 106 + 4 x 2 = 114, which means it's a multiple of 19 |
134 | The number is a multiple of 2 and 67 at the same time | 1,072 is a multiple of 134 because it ends in 2, which means it's a multiple of 2, and 107 - 2 x 20 = 67, which means it's a multiple of 67 |
135 | The number is a multiple of 5 and 27 at the same time | 1,080 is a multiple of 135 because it ends in 0, which means it's a multiple of 5, and 108 - 0 x 8 = 108, which means it's a multiple of 27 |
136 | The number is a multiple of 8 and 17 at the same time | 1,088 is a multiple of 136 because it ends in 088, which means it's a multiple of 8 and 108 - 8 x 5 = 68, which means it's a multiple of 17 |
137 | The difference between 41 times the last digit and the rest of the number is a multiple of 137 | 1,096 is a multiple of 137 because 6 x 41 - 109 = 137 and 137 is a multiple of 137 |
138 | The number is a multiple of 2, 3 and 23 at the same time | 1,104 is a multiple of 138 because it ends in 4, which means it's a multiple of 2, 1 + 1 + 4 = 6, which means it's a multiple of 3, and 110 + 4 x 7 = 138, which means it's a multiple of 23 |
139 | The sum of 14 times the last digit and the rest of the number is a multiple of 139 | 1,112 is a multiple of 139 because 111 + 2 x 14 = 139 and 139 is a multiple of 139 |
140 | The number is a multiple of 7 and 20 at the same time | 1,120 is a multiple of 140 because 112 - 0 x 2 = 112, which means it's a multiple of 7, and ends in 20, which means it's a multiple of 20 |
141 | The number is a multiple of 3 and 47 at the same time | 1,128 is a multiple of 141 because 1 + 1 + 2 + 8 = 12, which means it's a multiple of 3, and 112 - 8 x 14 = 0, which means it's a multiple of 47 |
142 | The number is a multiple of 2 and 71 at the same time | 1,136 is a multiple of 142 because it ends in 6, which means it's a multiple of 2, and 113 - 6 x 7 = 71, which means it's a multiple of 71 |
143 | The number is a multiple of 11 and 13 at the same time | 1,001 is a multiple of 143 because 100 - 1 = 99, which means it's a multiple of 11, and 100 + 1 x 4 = 104, which means it's a multiple of 13 |
144 | The number is a multiple of 9 and 16 at the same time | 10,080 is a multiple of 144 because 1 + 8 = 9, which means it's a multiple of 9, and ends in 0,080, which means it's a multiple of 16 |
145 | The number is a multiple of 5 and 29 at the same time | 1,015 is a multiple of 145 because it ends in 5, which means it's a multiple of 5, and 101 + 5 x 3 = 116, which means it's a multiple of 29 |
146 | The number is a multiple of 2 and 73 at the same time | 1,022 is a multiple of 146 because it ends in 2, which means it's a multiple of 2, and 102 + 2 x 22 = 146, which means it's a multiple of 73 |
147 | The number is a multiple of 3 and 49 at the same time | 1,029 is a multiple of 147 because 1 + 2 + 9 = 12, which means it's a multiple of 3, and 102 + 9 x 5 = 147, which means it's a multiple of 49 |
148 | The number is a multiple of 4 and 37 at the same time | 1,036 is a multiple of 148 because it ends in 36, which means it's a multiple of 4, and 103 - 6 x 11 = 37, which means it's a multiple of 17 |
149 | The sum of 15 times the last digit and the rest of the number is a multiple of 149 | 1,043 is a multiple of 149 because 104 + 3 x 15 = 149 and 149 is a multiple of 149 |
150 | The number is a multiple of 3 and 50 at the same time | 1,050 is a multiple of 150 because 1 + 5 = 6, which means it's a multiple of 3, and ends in 50, which means it's a multiple of 50 |
151 | The difference between 15 times the last digit and the rest of the number is a multiple of 151 | 1,057 is a multiple of 151 because 105 - 7 x 15 = 0 and 0 is a multiple of 151 |
152 | The number is a multiple of 8 and 19 at the same time | 1,064 is a multiple of 152 because it ends in 064, which means it's a multiple of 8, and 106 + 4 x 2 = 114, which means it's a multiple of 19 |
153 | The number is a multiple of 9 and 17 at the same time | 1,071 is a multiple of 153 because 1 + 7 + 1 = 9, which means it's a multiple of 9, and 107 - 1 x 5 = 102, which means it's a multiple of 17 |
154 | The number is a multiple of 2, 7 and 11 at the same time | 1,078 is a multiple of 154 because it ends in 8, which means it's a multiple of 2, 107 - 8 x 2 = 91, which means it's a multiple of 7, and 107 - 8 = 99, which means it's a multiple of 11 |
155 | The number is a multiple of 5 and 31 at the same time | 1,085 is a multiple of 155 because it ends in 5, which means it's a multiple of 5, and 108 - 5 x 3 = 93, which means it's a multiple of 31 |
156 | The number is a multiple of 3, 4 and 13 at the same time | 1,092 is a multiple of 156 because 1 + 9 + 2 = 12, which means it's a multiple of 3, ends in 92, which means it's a multiple of 4, and 109 + 2 x 4 = 117, which means it's a multiple of 13 |
157 | The difference between 47 times the last digit and the rest of the number is a multiple of 157 | 1,099 is a multiple of 157 because 9 x 47 - 109 = 314 and 314 is a multiple of 157 |
158 | The number is a multiple of 2 and 79 at the same time | 1,106 is a multiple of 158 because it ends in 6, which means it's a multiple of 2, and 110 + 6 x 8 = 158, which means it's a multiple of 79 |
159 | The number is a multiple of 3 and 53 at the same time | 1,113 is a multiple of 159 because 1 + 1 + 1 + 3 = 6, which means it's a multiple of 3, and 111 + 3 x 16 = 159, which means it's a multiple of 53 |
160 | The last 5 digits are a multiple of 160; the 10,000s digit is even and the last 4 digits are a multiple of 160 or the 10,000s digit is odd and the last 4 digits are 80 times an odd number | 100,000 is a multiple of 160 because the 10,000s digit is 0, an even number, and the last 4 digits are 0,000, a multiple of 160 |
161 | The number is a multiple of 7 and 23 at the same time | 1,127 is a multiple of 161 because 112 - 7 x 2 = 98, which means it's a multiple of 7, and 112 + 7 x 7 = 161, which means it's a multiple of 23 |
162 | The number is a multiple of 2 and 81 at the same time | 1,134 is a multiple of 162 because it ends in 4, which means it's a multiple of 2, and 113 - 4 x 8 = 81, which means it's a multiple of 81 |
163 | The sum of 49 times the last digit and the rest of the number is a multiple of 163 | 1,141 is a multiple of 163 because 114 + 1 x 49 = 163 and 163 is a multiple of 163 |
164 | The number is a multiple of 4 and 41 at the same time | 1,148 is a multiple of 164 because it ends in 64, which means it's a multiple of 4, and 114 - 8 x 4 - 82, which means it's a multiple of 41 |
165 | The number is a multiple of 3, 5 and 11 at the same time | 1,155 is a multiple of 165 because 1 + 1 + 5 + 5 = 12, which means it's a multiple of 3, ends in 5, which means it's a multiple of 5, and 115 - 5 = 110, which means it's a multiple of 11 |
166 | The number is a multiple of 2 and 83 at the same time | 1,162 is a multiple of 166 because it ends in 2, which means it's a multiple of 2, and 116 + 2 x 25 = 166, which means it's a multiple of 83 |
167 | The difference between 50 times the last digit and the rest of the number is a multiple of 167 | 1,002 is a multiple of 167 because 100 - 2 x 50 = 0 and 0 is a multiple of 167 |
168 | The number is a multiple of 3, 7 and 8 at the same time | 1,008 is a multiple of 168 because 1 + 8 = 9, which means it's a multiple of 3, 100 - 8 x 2 = 84, which means it's a multiple of 7, and ends in 008, which means it's a multiple of 8 |
169 | The sum of 17 times the last digit and the rest of the number is a multiple of 169 | 1,014 is a multiple of 169 because 101 + 4 x 17 = 169 and 169 is a multiple of 169 |
170 | The number is a multiple of 10 and 17 at the same time | 1,020 is a multiple of 170 because it ends in 0, which means it's a multiple of 10, and 102 - 0 x 5 = 102, which means it's a multiple of 17 |
171 | The number is a multiple of 9 and 19 at the same time | 1,026 is a multiple of 171 because 1 + 2 + 6 = 9, which means it's a multiple of 9, and 102 + 6 x 2 = 114, which means it's a multiple of 19 |
172 | The number is a multiple of 4 and 43 at the same time | 1,032 is a multiple of 172 because it ends in 32, which means it's a multiple of 4, and 103 + 2 x 13 = 129, which means it's a multiple of 43 |
173 | The sum of 52 times the last digit and the rest of the number is a multiple of 173 | 1,038 is a multiple of 173 because 103 + 8 x 52 = 519 and 519 is a multiple of 173 |
174 | The number is a multiple of 2, 3 and 29 at the same time | 1,044 is a multiple of 174 because it ends in 4, which means it's a multiple of 2, 1 + 4 + 4 = 9, which means it's a multiple of 3, and 104 + 4 x 3 = 116, which means it's a multiple of 29 |
175 | The number is a multiple of 7 and 25 at the same time | 1,050 is a multiple of 175 because 105 - 0 x 2 = 105, which means it's a multiple of 7, and ends in 50, which means it's a multiple of 25 |
176 | The number is a multiple of 11 and 16 at the same time | 10,032 is a multiple of 176 because 1,003 - 2 = 1,001, which means it's a multiple of 11, and ends in 0,032, which means it's a multiple of 16 |
177 | The number is a multiple of 3 and 59 at the same time | 1,062 is a multiple of 177 because 1 + 6 + 2 = 9, which means it's a multiple of 3, and 106 + 2 x 6 = 118, which means it's a multiple of 59 |
178 | The number is a multiple of 2 and 89 at the same time | 1,068 is a multiple of 178 because it ends in 8, which means it's a multiple of 2, and 106 + 8 x 9 = 178, which means it's a multiple of 178 |
179 | The sum of 18 times the last digit and the rest of the number is a multiple of 179 | 1,074 is a multiple of 179 because 107 + 4 x 18 = 179 and 179 is a multiple of 179 |
180 | The number is a multiple of 9 and 20 at the same time | 1,080 is a multiple of 180 because 1 + 8 = 9, which means it's a multiple of 9, and ends in 80, which means it's a multiple of 20 |
181 | The difference between 18 times the last digit and the rest of the number is a multiple of 181 | 1,086 is a multiple of 181 because 108 - 6 x 18 = 0 and 0 is a multiple of 181 |
182 | The number is a multiple of 2, 7 and 13 at the same time | 1,092 is a multiple of 182 because it ends in 2, which means it's a multiple of 2, 109 - 2 x 2 = 105, which means it's a multiple of 7, and 109 + 2 x 4 = 117, which means it's a multiple of 13 |
183 | The number is a multiple of 3 and 61 at the same time | 1,098 is a multiple of 183 because 1 + 9 + 8 = 18, which means it's a multiple of 3, and 109 - 8 x 6 = 61, which means it's a multiple of 61 |
184 | The number is a multiple of 8 and 23 at the same time | 1,104 is a multiple of 184 because it ends in 104, which means it's a multiple of 8, and 110 + 4 x 7 = 138, which means it's a multiple of 23 |
185 | The number is a multiple of 5 and 37 at the same time | 1,110 is a multiple of 185 because it ends in 0, which means it's a multiple of 5, and 111 - 0 x 11 = 111, which means it's a multiple of 37 |
186 | The number is a multiple of 2, 3 and 31 at the same time | 1,116 is a multiple of 186 because it ends in 6, which means it's a multiple of 2, 1 + 1 + 1 + 6 = 9, which means it's a multiple of 3, and 111 - 6 x 3 = 93, which means it's a multiple of 31 |
187 | The number is a multiple of 11 and 17 at the same time | 1,122 is a multiple of 187 because 112 - 2 = 110, which means it's a multiple of 11, and 112 - 2 x 5 = 102, which means it's a multiple of 17 |
188 | The number is a multiple of 4 and 47 at the same time | 1,128 is a multiple of 188 because it ends in 28, which means it's a multiple of 4, and 112 - 8 x 14 = 0, which means it's a multiple of 47 |
189 | The number is a multiple of 7 and 27 at the same time | 1,134 is a multiple of 189 because 113 - 4 x 2 = 105, which means it's a multiple of 7, and 113 - 4 x 8 = 81, which means it's a multiple of 27 |
190 | The number is a multiple of 10 and 19 at the same time | 1,140 is a multiple of 190 because it ends in 0, which means it's a multiple of 10, and 114 + 0 x 2 = 114, which means it's a multiple of 19 |
191 | The difference between 19 times the last digit and the rest of the number is a multiple of 191 | 1,146 is a multiple of 191 because 114 - 6 x 19 = 0 and 0 is a multiple of 191 |
192 | The number is a multiple of 3 and 64 at the same time | 1,000,128 is a multiple of 192 because 1 + 1 + 2 + 8 = 12, which means it's a multiple of 3, and ends in 000,128, which means it's a multiple of 64 |
193 | The sum of 58 times the last digit and the rest of the number is a multiple of 193 | 1,158 is a multiple of 193 because 115 + 8 x 58 = 579 and 579 is a multiple of 193 |
194 | The number is a multiple of 2 and 97 at the same time | 1,164 is a multiple of 194 because it ends in 4, which means it's a multiple of 2, and 116 - 4 x 29 = 0, which means it's a multiple of 97 |
195 | The number is a multiple of 3, 5 and 13 at the same time | 1,170 is a multiple of 195 because 1 + 1 + 7 = 9, which means it's a multiple of 3, ends in 0, which means it's a multiple of 5, and 117 + 0 x 4 = 117, which means it's a multiple of 13 |
196 | The number is a multiple of 4 and 49 at the same time | 1,176 is a multiple of 196 because it ends in 76, which means it's a multiple of 4, and 117 + 6 x 5 = 147, which means it's a multiple of 49 |
197 | The difference between 59 times the last digit and the rest of the number is a multiple of 197 | 1,182 is a multiple of 197 because 118 - 2 x 59 = 0 and 0 is a multiple of 197 |
198 | The number is a multiple of 2, 9 and 11 at the same time | 1,188 is a multiple of 198 because it ends in 8, which means it's a multiple of 2, 1 + 1 + 8 + 8 = 18, which means it's a multiple of 9, and 118 - 8 = 110, which means it's a multiple of 11 |
199 | The sum of 20 times the last digit and the rest of the number is a multiple of 199 | 1,194 is a multiple of 199 because 119 + 4 x 20 = 199 and 199 is a multiple of 199 |
200 | The number ends in 000, 200, 400, 600 or 800 | 1,000 is a multiple of 200 because it ends in 000 |
I want to make a compilation video about easy and quick arithmetic tricks. I can think of some but I'd like to know how different people find their tricks and apply them
But they all have the odd integers separated by two even integer. And the odd integers end in 2-1 in the modified binary form.
Also, quick verification: all odd integers that form a repeating cycle in the Collatz-type 5n+1 sequence either end in 2-1 or 4-1.
While I'm bored at work, I use my work phone's calculator app to memorize the digits of pi, but I was concerned about how accurate it was. This lead me to check ahead to see when it breaks, but it turns out to be accurate to at least 500 digits (where I stopped checking)
From a software perspective it seems inefficient to simply store such a precise value, so I was wondering if there was some mathematical trick being used instead to calculate pi to arbitrary precision as needed.
I'm recently into making videos to teach math. I'm starting with 3rd grade, and will gradually add more videos about other concept and exercise.
Do you think this style of video and the way I explain is easy to understand? What should I add or change to make it better and approachable?
For me, it would have to be proportional equations. They have so many uses! One way I've used them is to measure the height of a tree, by measuring a nearby small tree and it's shadow. Smaller tree/smaller shadow=X"bigger tree"/bigger shadow.
Another way I use it, is at work. I have to make an estimate of our product shipments every other week, but sometimes our truck breaks down and we have to wait 5 weeks to ship. I use a proportional equations to predict how much product I'm going to have at week 5, during week 3. So I have 246 cases during week 3. I would use the following equation.
246/3=X/5.
So 246(5)=1230. 1230/3=410.
So I know that I will have roughly 410 cases at week 5. It's not exact, but it close enough to know how much space I will need to account for in the truck once it's up and running again.
So I've always said that my favorite equations are proportional equations. Not that many people ask, but in the few times I HAVE been asked, that what I always say lol.
You are to design a function and rearrange it in some convoluted way to satisfy the below requirements. Scroll down for a demo/example of one and below that is full info on the CompSci aspect for those curious.
Looking for feedback on this random example I conceived of (e.g. any issues you see with it) and eager to see all kinds of odd/creative solutions people come up with! Don’t be shy!
Base idea: with tA=sqrt(S+A), tB=sqrt(S+B), tC=sqrt(S+C), tD=sqrt(S+D), and let newS = max(S mod (tA-tB), S mod (tB-tC), S mod (tC-tD), S mod (tD-tA))
The idea brainstormed above fulfills none of the listed requirements BUT we can use crazy smart math (https://math.stackexchange.com/a/231245/255785) to manipulate it to:
S mod (tA-tB)
into ceil(S / tAB)*tAB - S
for tAB=tA-tB
. #4 isn’t violated if we use FMA (fused-multiply-add) for full precision: fma(ceil(S/tAB),tAB,-S)
1/tAB=1/(sqrt(S+A)-sqrt(S+B))=(sqrt(S+A)+sqrt(S+B))/(A-B)
, which magically amends the precision loss to fix #4 AND separates the division to run in parallel with the sqrt, fixing #3.Putting both together, let’s rewrite the initial idea into a full function definition and satisfy all the requirements (as far as I can tell):
Our example function defined in steps 1-4 is not a conventional f(x)=y formula but it is a function of sorts and that’s what we’re looking for here.
Why exactly 4x div and 4x sqrt? Check the VSQRTPD (YMM, YMM) entry of AVX for your CPU at https://uops.info/table.html and you should see a latency around 19 or 21 at a recip tp of one schedulable every 9 cycles or so. The VDIVPD (YMM, YMM, YMM) has a similar deal with a latency of 13 or 15 at a recip TP of one schedulable every 5 or 8 cycles. Apple’s Firestorm is a bit better at FSQRT 2D (even considering 2x of those are needed in place of one AVX VSQRTPD) and significantly better in throughput at FDIV 2D: https://dougallj.github.io/applecpu/firestorm-simd.html. Thus, queuing 4x div and 4x sqrt simultaneously ensures pretty good utilization of common consumer hardware across the board. Other consumer CPUs are rare but always have some kind of hardware to accelerate double sqrt and double div and shouldn’t be worse than a few times slower. Iot CPUs like the ARM Cortex-M0 have such disparate incompatible use-cases as this algorithm that they don’t need to be a consideration as there has never nor will ever be a need on these CPUs.
PURPOSE: I hope to design a new fpga/asic/gpu resistant hash function much safer from side-channel attack than existing ones like Scrypt, Bcrypt, Argon2, etc.
Ask yourself, what complex, transistor-hungry operations are valuable enough for most CPUs to spend millions of transistors optimizing to take nanoseconds?
Often the answer to this is some clever trickery involving unpredictable memory access, as the bulk of the work is spent moving data around, which can’t be done at all on a GPU and isn’t much faster on an fpga/asic because memory interconnect and shuffle/table SIMD are stupid expensive due a tradeoff between gate depth and wire crossover that’s equally terrible/costly both ways. (Interestingly, if 3d CPUs become possible, their shuffle has less gates than addition and interconnect is nearly free.)
A key issue with unpredictable memory access is side channel attacks, especially fault injection or cache attacks. To mitigate this, some password hashes only do memory access based on the public salt, which leaks no information about the private password but leaves it extremely susceptible to GPU cracking as you can write a GPU-program-generator for each hash that unwrangles the fixed memory access pattern for that particular salt into an efficient program purpose-built to crack that specific password. Argon2ID does data-independent hashing followed by data-dependent access based on the encrypted/hashed intermediary result, not based on the salt. This is pretty good but not perfect as it leaves Argon2ID susceptible to side-channel attacks leaking the intermediary hashed result and proceeding to GPU cracking it.
INSTEAD, my answer is SIMD division and square root. You can’t make those much faster on an fpga, and, anyway, it would push an fpga’s transistor budget to eke out a slight win. Of course!, square roots alone could be FPGAized by turning them into max-depth 1000+ cycle pipeline of multipliers for repeated newton sqrt iterations, giving terafloats/s sqrt throughput and quickly breaking the hash in parallel. Division alone risks the same thing. However, sqrt and division together cannot efficiently share resources without significant penalty to both because they use different newton steps (requiring the overhead of mock-cpu-like resource management and sharing of multipliers/adders, which would throw a wrench in performance). So, substantially faster terafloat/s sqrt/div would have to be physically separated in different units on an fpga/asic. This doesn’t play well at all when the two units operate in lock step, requiring tremendous transistor investment for interconnect, because both div and sqrt are needed for the final result, which is needed to know what the inputs to the next computation will be. This overwhelms FPGAs with a ballooning break-even struggle to beat a CPU; yes, ASICs essentially being FPGA programs lazered into silicon akin to custom CPUs, must realize some net profit but they will never be orders of magnitude faster than a consumer CPU at this. (Relative to, e.x. SHA256, which run at 100s of thousands per sec in software and 1000s of trillions per sec in ASIC.)
Fixing the side channel leakage of variable div/sqrt timing on some CPUs is actually quite trivial: I’ll just run some integer operations to spend ~20 cycles ARXing an internal state using only general registers, no SIMD; the div and sqrt should both be all done by the time the ARXing finishes. The mythical thousands of clock cycles float operations only ever happen with subnormals and NaN/Infinity on some CPUs, and I didn’t mention previously but sanity-check minimum halfway to subnormal will be enforced for dividend prior to division just in case.
To prevent GPU cracking, we access the data in an unpredictably incrementing (thereby side channel resistant) pattern depending on each calculation result:
First, we hash the password into a megabyte of random bytes plus the initial state, S. Then, we work our way towards the center from both ends, starting with A and B as the first words in memory and C and D as the last works. Each successive computation, we store newA, newB, newC, and newD into the same slots we read from, then choose whether to increment the memory start pos or decrement end—direction ^= (newA < newC) ^ (newB < newD) using ^ as xor—then repeat until the start and the end meet in the middle.
/compsci rant skip this section if you’re not into compsci stuff thank you
I discovered this while trying to understand Lagrange' Polynomial Interpolation formula. If anyone has information on related studies/topics, feel free to comment.
Consider the product (x-k_1) * (x-k_2) * (x-k_3)...(x-k_n)
Let S(n,r) denote the set of all nCr product combinations possible from n distinct elements of a set of constants taking r elements for the product. In this case, the elements are constants k_i, where i ranges from 1 to n. Let Σ(n,r) denote the sum of elements of set S obtained this way. Let Σ(n,0) = 1.
Then,
Product(x-k_i)(i=1 to n) = Sum((-1)^i * Σ(n,i) * x^(n-i))(i=0 to n)
I don't have a proof for this in general, I have only verified it till n=4. But let's take an example.
Take (x-k_1) * (x-k_2) * (x-k_3)
S(3,1) = { k_1, k_2, k_3 }
Σ(3,1) = k_1 + k_2 + k_3
S(3,2) = { k_1 * k_2, k_2 * k_3, k_1 * k_3 }
Σ(3,2) = k_1 * k_2 + k_2 * k_3 + k_1 * k_3
S(3,3) = k_1 * k_2 * k_3
Σ(3,3) = k_1 * k_2 * k_3
So,
(x-k_1) * (x-k_2) * (x-k_3) = x^3 - (k_1 + k_2 + k_3) * x^2 + (k_1 * k_2 + k_2 * k_3 + k_1 * k_3) * x - k_1 * k_2 * k_3
You can verify this by multiplying the monomials. For n = 2, if you compare this form with the standard quadratic equation form ax^2 + bx + c, you can rederive the properties of roots of quadratic equation.
I was playing around on anydice.com and I noticed that the difference between two 12-sided dice has an exactly 50% chance of being 4 or greater. I could not find any other dice that have a 50% chance of having any difference or greater except for 2 sided dice, which have a 50% chance of being 1 apart.
Are there any other dice that have this property? Is there something special about these numbers? Thanks in advance.