As someone from a scientific education background I can't help but notice that while, for example, biology is mentioned (and at times important) in the Harry Potter books and potions (akin to chemistry), there are no mentions made of math courses.   The logical explanation to me seems that as a writer, Rowling understood that for most of the target audience, maths won't be at the top of the list of interesting subjects.  However, is there an in-universe explanation as to why mathematics seems absent from the wizarding world?    What about Muggle-born kids who are taught and like math but are then shipped off to Hogwarts where, seemingly, math is a no-no?
I always wondered if children who graduate from Hogwarts have an education that is actually worth while in the real world.  Do the children learn math and English?  I can see History of Magic as practical. I know of Arithmancy, but that's the study of the magical properties of numbers, not math.   Since Hogsmead is one of the very last all-magical towns, it's a fair assumption that a majority of the students at Hogwarts will be living in non-magical towns or cities. If practical classes (like math or English) aren't taught, then how do these students function in the non-magical cities?
How do I detect when someone shakes an iPhone? I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this? Are Mersenne prime exponents always odd? I have been researching  so I can write a program that finds them. A Mersenne prime looks like $2^n-1$. When calculating them, I have noticed that the $n$ value always appears to be odd. Is there confirmation or proof of this being true? Dividing polynomial $f(x)$ by $x-3$ and $x+6$ leaves respective remainders $7$ and $22$. What's the remainder upon dividing by $(x-3)(x+6)$? I want to be able to program a  with  but I'm not sure what pins on the actual chip I should use, and all the guides seemed to be using a different chip Travelling with two different passports I was just wondering if you have two passports (a Chinese one and an Australian one), and you booked your airline ticket with the Chinese one, will you have to show both of your passports or just one?  The thing is, on my Chinese passport, it has my birth name, but then when I became an Australian citizen, I legally removed my Chinese name and replaced it with my English name. So I don't know whether I should just show the passport officials the one that I booked the airline ticket with. Is my paper under review (or similar) for too long and if yes, how should I react? My Bridgestone MB-5 currently has a 7-speed rear wheel. I'd like to convert it to a 10-speed. Is this possible? Is it practical? Customized prompt does not hold when a child bash is ran I have been learning bash, and while doing so I played around with the .bash_profile file to be able to put greeting messages etc. Later I just removed these changes. But after doing that my default configuration of prompt got lost: originally, the prompt was all in bold, and \w part was blue so that when I was in a deeply nested directory the prompt would not seem so entangled. I think that was the default for Ubuntu (correct me if i'm wrong), however like  I said it got lost and my prompt was non-bold and monochromatic resulting in a mess when I'm in long named directories.  So, last night I tried customizing my prompt in the fashion I mentioned above. It worked well after I added the code to .bash_profile  Code was like this:  export PS1="\[$(tput bold)\]\u@\h:\[$(tput sgr 0)\]\e[1;34m\w$ \e[m"   However if I try to run another bash shell in the current one, the prompt becomes unformatted:    Is that normal? Isn't the whole point of exporting a variable to make it accessible from all the child processes forked from that shell? Why it doesn't that apply to this situation? Choice of personal pronoun in single-author papers Which personal pronoun is appropriate in single-author papers - 'I' or 'we'? Could the use of 'I' be considered egotistical? Or will the use of 'we' be considered to be grammatically incorrect? In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="&lt;funny characters here&gt;" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user. Elevating process privilege programmatically? The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by $\sum_{k=1}^{n-1} {n-1 \choose k-1} k^{k-2} (n-k)^{n-k-2}$.  I am unsure how to approach this question. Could someone guide me through the proof? If G is a spanning tree and it is disconnected then I know it is a spanning forest. Also, I know by Cayley's thm that there are $n^{n-2}$ nonequal tree on a vertex set V = {1, 2, ...,n} which is where i'm assuming the $k^{k-2}$ comes from but I do not understand where the rest of it is coming from. Of Half-elven and mortal life When to use Stateful session bean over Stateless session bean? How can I compile, run and decompile C# code in Ubuntu terminal? Bash - Integer expression expected Android - Read Only File System IOException How do I size a UITextView to its content? Pattern in Isomorphisms between $\mathbb Z_m \times \mathbb Z_n$ and $\mathbb Z_{mn}$ In general, the group $\mathbb Z_{mn}$ under addition $\bmod mn$ is isomorphic to the direct product $\mathbb Z_m \times \mathbb Z_n$ if and only if $\gcd(m,n)=1.$ This is easy to see since $\mathbb Z_{mn}$ is generated by the element $(1,1)$, and if $\gcd(m,n)=1$, then this will only be zero if it is multiplied by itself $mn$ times (resulting in the cyclic group).   However I'm interested in constructing an isomorphism between the two groups as an explicit expression. I've been playing around a bit with some examples, one of which is the function $\phi : \mathbb Z_2 \times \mathbb Z_3 \to \mathbb Z_6$ where $\phi(a,b) = 3a + 4b \pmod 6$, which gives us the desired isomorphism. I'm interested here in the relationship between the integers $2$, $3$, and the coefficients $3, 4$ of $a$ and $b$. After playing around in Wolfram|Mathematica, I managed to obtain the following isomorphisms $\phi_{m,n} : \mathbb Z_m \times \mathbb Z_n \to \mathbb Z_{mn}$ for coprime $m,n$ in $\{1, 2, \dots, 10\}$.   First of all, the following results seem to hold in general.  $$\phi_{1, n}(a, b) = a + b \qquad \text{for all $n$}$$  $$\phi_{m, 1}(a, b) = a + b \qquad \text{for all $m$}$$  $$\phi_{2, n}(a, b) = na + (n + 1)b \qquad \text{for all $n$}$$ $$\phi_{m, n}(a, b) = K a + L b \iff \phi_{n,m}(a, b) = L a + K b \qquad \text{for all $m, n$}$$  Beyond this point, I could not spot a general pattern. The isomorphisms I obtained are:  $$\phi_{3, 4}(a, b) = 4a + 9b$$ $$\phi_{3, 5}(a, b) = 10a + 6b$$ $$\phi_{3, 7}(a, b) = 7a + 15b$$ $$\phi_{3, 8}(a, b) = 16a + 9b$$ $$\phi_{3, 10}(a, b) = 10a + 21b$$ $$\phi_{4, 5}(a, b) = 5a + 16b$$ $$\phi_{4, 7}(a, b) = 21a + 8b$$ $$\phi_{4, 9}(a, b) = 9a + 28b$$ $$\phi_{5, 6}(a, b) = 6a + 25b$$ $$\phi_{5, 7}(a, b) = 21a + 15b$$ $$\phi_{5, 8}(a, b) = 16a + 25b$$ $$\phi_{5, 9}(a, b) = 36a + 10b$$ $$\phi_{6, 7}(a, b) = 7a + 36b$$ $$\phi_{7, 8}(a, b) = 8a + 49b$$ $$\phi_{7, 9}(a, b) = 36a + 28b$$ $$\phi_{7, 10}(a, b) = 50a + 21b$$ $$\phi_{8, 9}(a, b) = 9a + 64b$$ $$\phi_{9, 10}(a, b) = 10a + 81b$$ If you want to try and generate a few yourself, here is the Mathematica function I implemented. I'm sure it can be optimised, but for the first 10 coprime integers it sufficed.  isomorphism[{m_, n_}] :=       Module[{x = Null},       For[i = 1, i &lt; m*n,           i++, (If[#[[2]] == Table[i, {i, 0, m*n - 1}],           x = ToString[#[[1]][[1]]] &lt;&gt; "a+" &lt;&gt; ToString[#[[1]][[2]]] &lt;&gt;          "b"; Break[]] &amp;) /@       Table[{{i, j},       Mod[i #[[1]] + j #[[2]], m*n] &amp; /@       Table[{Mod[i, m], Mod[i, n]}, {i, 0, m*n - 1}]}, {i, 1,      m*n}, {j, 1, m*n}][[i]]]; x];   I'd appreciate if anyone can help me find the pattern to determine $\phi_{m, n}$ in general. At 12 o'clock, the hour hand and minute hand of the clock can be swapped, and the clock still gives the same time, but at 6 o'clock, it can not be swapped. So in what cases when we swap the hour and the minute hand position does a clock still give a valid time?