# Episode 0

In **episode 0**, we solve a problem with square numbers, learn about quadratic residues, and talk about an Oxford maths interview question about cubics.

#### Further Reading

#### Quadratic residues

Modular arithmetic came up in chat, and I didn’t have time to do a very good explanation of what it is. If you haven’t come across this before (or even if you have), there’s a nice UKMT webinar introduction to modular arithmetic, made by Lizzie Kimber and Vicky Neale, available here; https://www.youtube.com/watch?v=ZnAW3IQNhTw.

You can read the Wolfram Mathworld article on Quadratic residues for more information https://mathworld.wolfram.com/QuadraticResidue.html. This very quickly goes way beyond what we talked about on Thursday. Near the top of the page there’s an interesting picture which looks a bit like a pixelated right-angled triangle with a speckled pattern in it. This isn’t referred to in the text of the article. What do you think this picture shows? Can you see any patterns or structure in the picture? Can you make sense of your observations with mathematics? If you’re interested in computers or programming, you might like the challenge of trying to reproduce this picture yourself.

We didn’t talk about the amazing quadratic reciprocity theorem https://mathworld.wolfram.com/QuadraticReciprocityTheorem.html. Don’t try to prove this, but do try to understand what it’s saying. Can you interpret what it means (and check that it’s true) for some pair of small values of the primes $p$ and $q$?

#### Cubics and splines

In the interview problem we discussed, the question gave information about the end-points and asked us to find a cubic that satisfied certain conditions at each end. We could join two or more of these cubics together, to have (for example) one cubic defined between 0 and 1, then another cubic defined between 1 and 2 (this is called a piecewise polynomial, because it’s made of pieces that are polynomials).

We could specify conditions at 0 and 1 and 2 to get a solution for these cubics. One popular way to do this is to set the value at 0 and at 1 and at 2 (i.e. here are some points in the $(x,y)$-plane now please join the dots), and then we could require that the cubics have the same gradient at 1 and the same second derivative at 1, and that they also have zero second derivative at 0 and at 2. Here’s a clean statement of that problem in case you want to have a go at it.

Given numbers $y_0$, $y_1$, $y_2$, find two cubics $y=f(x)$ and $y=g(x)$ with the following properties (where primes ' indicate differentiation);

$f(0)=y_0$. $f(1)=y_1$. $g(1)=y_1$. $g(2)=y_2$.

$f’(1)=g’(1)$. $f’’(1)=g’’(1)$. $f’’(0)=0$. $g’’(0)=0$.

This looks much harder than the problem that we did in the livestream (because there are twice as many equations!). But on the other hand, there are only three parameters in the question, not four like the interview question. Interesting. Another hint: it’s easier to make progress if we think about the cubics separately at first.

If you’ve got arbitrary points in $(x,y)$-space that you’d like your curve to go through, then rather than think about $y$ as a function of $x$, you could instead look for a parametric curve. To do this, you’d make $x$ and $y$ both be functions of some hidden variable $t$ (which you take to be 0, 1, 2, 3, … at the points you want to go through- think of the numbers that label the points of a join-the-dots puzzle). The curves that you get when you do this are called cubic splines. https://mathworld.wolfram.com/CubicSpline.html

Q: The Wolfram MathWorld page on cubic splines is pretty tough, and probably doesn’t make much sense unless you’ve seen parametric curves and maybe also matrices. Which bits of this article do you recognise as maths you’ve seen before? Which bits are totally unfamiliar to you? Come back in six months. Have your answers changed?

#### Complete the square

Here’s a proper statement of the final problem I gave you to think about;

Suppose $N$ is a square number with 6 digits. Given the 2nd digit, the 4th digit, and the 6th digit, is there a unique value for $N$? Either prove that all square numbers with 6 digits differ in either their 2nd, 4th, or 6th digits, or prove that there are two square numbers with the same 2nd digit, same 4th digit, and same 6th digit.

And here’s a proper statement of the general version of this problem;

Suppose $N$ is a square number with $2n$ digits. Given the 2nd digit, the 4th digit, the 6th digit, …, and the $(2n)$th digit, is there a unique value for $N$? Either prove that all square numbers with $2n$ digits have a different sequence of numbers when you look at their 2nd, 4th, 6th, … $(2n)$th digits, or prove that there are two square numbers with the same 2nd digit, same 4th digit, …, and the same last digit.

If you want to get in touch with us about any of the mathematics in the video or the further reading, feel free to email us on oomc [at] maths.ox.ac.uk.