Category: Teaching

Find the nth term of a Quadratic Sequence (Maths GCSE)

Find the nth term of a Quadratic Sequence (Maths GCSE)

I’m currently helping my 15-yr-old son revise for his maths GCSE, and one topic is “finding the nth term of a quadratic sequence”. I’m an ex high school maths teacher, but I had forgotten how to do this. I couldn’t find decent complex examples on either of my favourite GCSE maths revision sites (Maths Genie and BBC Bitesize), and when you’re doing the more complex examples, a step-by-step guide is really useful.

So I’m placing my notes here in case they’re any use to anyone else.

You’re aiming for a result of an2 + bn + c, but easier examples might have a solution of an2 + b, and even easier ones will just be an2.

Simplest Example (an2):

Find the nth term for the following quadratic sequence: 3, 12, 27, 48, …

First calculate the gaps between the numbers – these are 9, 15 and 21.

Then find the gaps between the gaps – these are 6 and 6. Like this:

nth-term-05

Take that 6 and divide it by 2 (it’s easy to forget to divide by 2!), to get 3. This tells you that your final result will contain the term 3n2.

I’ve already told you that this is a simple example – we’ve reached our solution: 3n2. But you should always check your results:

n 1 2 3 4
n2 1 4 9 16
3n2 3 12 27 48

Yup, that’s our original sequence.

More Complex Example (an2 + b):

Find the nth term for the following quadratic sequence: 1, 10, 25, 46, …

First calculate the gaps between the numbers – these are 9, 15 and 21.

Then find the gaps between the gaps – these are 6 and 6. Like this:

nth-term-04

Take that 6 and divide it by 2 (it’s easy to forget to divide by 2!), to get 3. This tells you that your final result will contain the term 3n2.

Create a grid, which starts with your original sequence. Below that, add whatever rows you need to help you calculate 3n2.

Now, subtract 3nfrom the original sequence. So in the below grid, we subtract the fourth row from the first row, and that gives us a new sequence, which we have placed in the fifth row:

start 1 10 25 46
n 1 2 3 4
n2 1 4 9 16
3n2 3 12 27 48
start minus 3n2 -2 -2 -2 -2

We now have a row of constant numbers. This tells us we can reach a solution. It tells us to add -2 to 3n2, and that will be our solution: 3n2 – 2.

We can easily check this by adding up the fourth and fifth rows, which gives us the first row (the original sequence).

Most Complex Example (an2 + bn + c):

Find the nth term for the following quadratic sequence: -8, 2, 16, 34, …

First calculate the gaps between the numbers – these are 10, 14 and 18.

Then find the gaps between the gaps – these are 4 and 4. Like this:

nth-term-03

Take that 4 and divide it by 2 (it’s easy to forget to divide by 2!), to get 2. This tells you that your final result will contain the term 2n2.

Create a grid, which starts with your original sequence. Below that, add whatever rows you need to help you calculate 2n2.

Now, subtract 2nfrom the original sequence. So in the below grid, we subtract the fourth row from the first row, and that gives us a new sequence, which we have placed in the fifth row:

start -8 2 16 34
n 1 2 3 4
n2 1 4 9 16
2n2 2 8 18 32
start minus 2n2 -10 -6 -2 2

We don’t have a row of constant numbers yet, so we need to keep working. We need to look at the gaps between the numbers in our new sequence (in the bottom row of the table):

nth-term-06

Now we have found a constant difference. This tells us that there will be a 4n in our answer. Note that this is because we have found a linear sequence. Note also that in the case of a linear sequence, we do NOT divide the number by 2.

So now we add some more rows to our grid. First we calculate 4n, and then we calculate 2n+ 4n. Finally we subtract (2n+ 4n) from our original sequence (subtract the 7th row from the first row):

start -8 2 16 34
n 1 2 3 4
n2 1 4 9 16
2n2 2 8 18 32
start minus 2n2 -10 -6 -2 2
4n 4 8 12 16
2n+ 4n 6 16 30 48
start minus (2n+ 4n) -14 -14 -14 -14

We now have a row of constant numbers. This tells us we can reach a solution. It tells us to add -14 to 2n+ 4n, and that will be our solution: 2n+ 4n – 14.

We can easily check this by adding up the seventh and eighth rows, which gives us the first row (the original sequence).

More worked complex examples

nth-term-01

Note that in this next one there is a NEGATIVE difference between the terms of the sequence on row 5. This one can easily catch you out. Rather than thinking of the difference between the numbers, it helps to ask yourself, “how do I get from each term to the next one?” The answer in this case is, “subtract one”. This one can also look a little tricky because it contains fractional numbers, but you just follow the same rules as before:

nth-term-07

Telling the Difference Between a Linear Sequence (an + b) and a Quadratic Sequence (an2 + bn + c).

When we calculate gaps between the numbers in the sequence, if the first level of gaps is constant, this means it is a linear sequence:

nth-term-06

If the second layer of gaps is constant, it is a quadratic sequence:

nth-term-03

How to Tie Your Shoelaces

How to Tie Your Shoelaces

! Stop the press !

Since writing this post I have been given an alternative method of tying your shoelaces – with two different demonstrations, both of which appear easier to teach, easier to learn and more effective. This leaves me slightly conflicted, because I’m rather proud of my lovely diagrams. So I’m going to leave the rest of this post in place, despite the fact that the two videos below effectively render it redundant. Oh well.

Original post:

I just dug this out again, for my 9-yr-old. Yeah, he can’t quite tie a shoelace yet. These days you can easily get away with it, because apart from walking boots, most kids’ shoes don’t have laces.

I enjoy teaching, but there is this thing called “Expert-Induced Amnesia“. It’s about that skill you’ve had for so long, you don’t know how you do it. When you try to teach it to other people, you struggle. As a parent, I’ve been starkly reminded of this in two examples: One is riding a bike, and the other is tying your shoelaces.

Teaching a child to ride a bike is extra hard, because you know at some point you’ll have to let go and hope for the best. And have the band-aid ready. But the shoelaces thing… maybe it’s just me, but wow, I found it hard to explain what I do and how I do it. My fingers just know. I don’t think about it. It’s muscle memory. And as soon as I try to slow it down and explain it, I can’t even remember what to do. I can only do it quickly, in a blur.

Also, learners need to practice repeatedly to get it right. Explaining this repeatedly can get wearing, particularly as most of the teaching opportunities come when you’re in a hurry to get out the door, and really you just want the shoes on the feet, with minimal fuss.

One of the hardest parts of teaching is patience. Resisting the urge to do it for them. “Oh, I’ll show you,” you say. You think you’re being helpful, but really you’re just being impatient. They need to do it for themselves.

That was a ridiculously long preamble.

Tl;dr: I forced myself to sit down and work it out, step by step. Then I drew diagrams and stuck them to a piece of card with laces attached. Then I gave it to my eldest son and left him to practice on his own. And now it’s my youngest son’s turn, so I dug the card out again (which is why it looks all tatty and old).

And here it is. Apologies for the tattiness. But just in case you’re teaching somebody to tie shoelaces, or learning to do it yourself… here are some diagrams that just might help.

(Also, apologies if you thought this was going to culminate in some fantastic metaphor, where the laces represent the meaning of life, the universe and everything. It really is a post about shoelaces.)

IMG_5445

IMG_5447

IMG_5448

 

Let’s Stop Making People Feel Stupid.

Let’s Stop Making People Feel Stupid.

(Image / comic by xkcd: https://xkcd.com/1053/)

“I know nothing.”

“I know less than nothing.”

“I am an impostor.”

“The more I learn, the more I realise how little I know.”

These are sentences that will be familiar to the vast majority of IT professionals. But how about these?

“They know nothing about X.”

“They have no relevant experience.”

“Wow, I just discovered my colleague doesn’t understand Y. I’m shocked.”

“Can you believe, I just interviewed this dev, and they didn’t even know what a Z was?”

Over my 18-year software career, those last two have been said to me countless times. They are said derisively, scornfully, impatiently. And every time those words are said, we lose both existing and potential members of our profession. We lose them because they feel stupid; because they believe they can’t keep up; because they have given up on ever really knowing what they’re doing; because they’re terrified that people are saying the same things about them.

We work in an industry where knowledge is highly valued, and where every time we look for a new job we have to prove how much we know. We find ways of posturing to one another, of proving how well-informed we are. Sometimes we join in when others’ knowledge is criticised – relieved that we are not the target ourselves.

And yet, we know that everybody has gaps. There are a million different paths through software development, touching a million different combinations of technologies and skills. On a day-to-day level we have to specialise on one task at a time. The skills we don’t need right now are necessarily forgotten, or delegated to someone else. And that’s fine.

If somebody already feels like they don’t “fit in”, then this kind of pressure and insecurity can be the final shove that persuades them to leave the profession or not try and join in the first place. Women and non-binary people, people of colour, older people, LGBT people and many other under-represented groups are strongly impacted by intellectual elitism. But of course, ALL software professionals are impacted.

Let’s stop putting pressure on individuals to know everything, and focus instead on how teams can work together to build and provide the unique combination of skills required to deliver their current project – in the certain knowledge that whatever that combination was today, it will be different tomorrow.

Instead of knowledge, let’s focus on aptitude. Instead of judging people about what they don’t know, let’s help them to feel excited about all the new things they’re going to discover.

Instead of saying “For God’s sake, do you really not know about X?” let’s say “Fantastic, you don’t know about X! Lucky you. That means you get to learn it. What can I do to help?”

(I’m hoping to do talks on this topic at events in 2018 – let me know if you have an event you’d like me to talk at).

Fighting Procrastination (in solidarity with all teachers everywhere)

Fighting Procrastination (in solidarity with all teachers everywhere)

I used to be a high school maths teacher. It didn’t go well. I miss the energy and creativity of the young people I worked with, but apart from that I have no regrets about leaving that profession behind me.

A friend of mine has just completed his first term of teacher training, and it’s HARD. You would think that now the Christmas holiday period has started, he’d be able to have a rest. Nuh-uh. Too much work to do.

Coincidentally I’ve also been facing a giant to-do list this week, and with the festive season fast approaching I’ve struggled to stay focused. But I have various coping mechanisms, which I just shared with my teaching friend and I thought were worth preserving for my own benefit too. And if they can help anyone else (particularly teachers), so much the better:

“What you have to remember is that you’ve been working flat out for months without even the option of slowing down. Whether you like it or not, your mind and body need a rest and what’s happening right now is that your subconscious is forcing that rest on you whether you like it or not. Sadly your conscious mind knows that there isn’t really time for that rest, and that’s preventing you from enjoying it – which is a shame.

So…

1) Accept right now that the workload is impossible. Therefore it’s either not all going to get done, or some of it will have to be done to a poor standard. There’s no point lying to yourself about that. You can’t bend time. You and thousands of other teachers are in the same position and you just have to accept it.

2) Given that you’re not going to get all of it done anyway, just pick TWO OR THREE SMALL THINGS and do those. Be unambitious. Don’t tell yourself “today I’m going to do the top 50 things on my to-do list,” because that’s a lie. You’re not going to achieve that, no matter how much you hope. And you already feel shit about that, and the whole thing is so depressing that it’s preventing you from doing anything.

Instead, aim low. Tell yourself you’re going to do a small number of things. Then do them, and feel good about having achieved your goals for the day. If that glow of success gives you the energy to do a little more, fantastic. But don’t plan for that, otherwise you’re back to square one.

Baby steps. You need to get back into a rhythm. If somebody gives you a mountain to climb when you’ve just eaten ten mince pies, you’re going to tell them to sod off. But a flight of stairs? Yeah. That’s a possibility.”

POSTSCRIPT:

I just did something which I realised I often do, and may also be good advice:

I scrolled down my to-do list until I found something I could easily do. The thing in question is pretty pointless and not at all urgent. It can easily wait til after Xmas and the world wouldn’t end if I never got round to it at all. But it’s a gateway drug. It’s not only easy, it’s vaguely enjoyable. And I know that it represents an “in”, ie once I’ve done that, I’ll be in the swing of Getting Things Done and I’ll find it easier to tackle a more worthwhile item from the list.

I know from experience that if I don’t do this, I’ll just arse around on the internet and do nothing from my to-do list. So it’s better to do something slightly pointless, but knowing I’ll find it much easier to follow it with something pointful… than to do nothing at all.

Advice for women (or anyone!) starting a career in tech

(a series of tweets originally sent to @ArrieLay and stored here for posterity…)

Fake it til you make it. Always act like you know what you’re doing, cos You DO – You’re being imperfect, just like everyone else.

Pay attention to people. Focus on empathy. Learn to pair. Learn to collaborate. Celebrate and enable your fellow team members.

Always come to work as yourself. Don’t be afraid to show vulnerabilities, and give others space to show theirs too.

Take risks. Relish your uncomfort zone.

Remember that EVERYBODY feels insecure about their knowledge levels. It’s impossible to know everything, and everybody thinks they are disadvantaged because others know more than them.

Learn to embrace your knowledge gaps. See them as exciting opportunities to learn more. Never be ashamed of them.

Have a questioning attitude, be open about your excitement about learning more. People respond well to it and will help you learn.

Question everything.

Love people. Even the annoying ones. People are great. People are useful. People will help you, whether they mean to or not. 🙂

And for the older amongst us… Age is an advantage, not a curse. Find the wisdom you forgot you had. Age is money in the bank.

Here are some links to some helpful resources for women arriving at or returning to careers in tech: https://insimpleterms.blog/2017/10/13/resources-for-women-arriving-at-or-returning-to-it/

Resources for Women Arriving at or Returning to IT

Just a bunch of links really, but hopefully useful…

Women returners:

Mums in technology: 

Tech Mums: 

Equate Scotland: 

13 places where women can learn to code: https://learntocodewith.me/posts/13-places-women-learn-code/

Code First Girls: https://codefirstgirls.typeform.com/to/ks4bsj

Code First Girls professional courses: http://www.codefirstgirls.org.uk/female-professionals.html

Offline resources:

 

Want to learn Git / improve your Git knowledge?

Want to learn Git / improve your Git knowledge?

This list is culled from a thread where people were asking for useful resources when learning Git. A lot of useful recommendations were made, so I’m summarising them here (for my own benefit as much as anything):

I ran a git workshop for some devs earlier this year – I created a repo, a bunch of exercises and some top tips. Everything you need to find your way around should be in the readme: https://github.com/claresudbery/Git-Playground

I find it very helpful to understand what the definition of a branch is: it’s just a commit, which defines the current head of the branch …and that allows you to explain the concept of “detached head”.

I would also encourage people to dig a little into the gitconfig folder and understand what diffs and commit IDs are all about.