CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →

KwickAcademy Artificial Intelligence · 7 min · free

Finding Patterns: How AI Spots Patterns in Numbers and Pictures

7 min4 KwickClipsFull text belowFree
Next lesson →Kajal Ma'am (MCA), teaching since 2004Remembered in this browser

A pattern repeats or changes by a rule. AI learns patterns from data so it can predict new cases. For number puzzles, check the differences first, then try multiplying or squares.

Follows the syllabus of: CBSE Class 9 Artificial Intelligence (417)

On screen in this lesson

What is a pattern?

Something that repeats or changes by a rule
Found in numbers, shapes, sounds and words
Example: the days of the week repeat every 7 days
Once you know the rule, you can predict

Why patterns are the heart of AI

AI learns rules from data, not from us
Finding a pattern lets AI predict
Spam filters, face unlock, weather forecasts
No pattern in the data means nothing to learn

Puzzle 1: adding

SequenceDifferencesNext
5, 9, 13, 17, ?+4 each time21
50, 45, 40, 35, ?-5 each time30
Rulesame differenceadd it again

Puzzle 2: multiplying

SequenceRuleNext
2, 4, 8, 16, ?multiply by 232
3, 9, 27, ?multiply by 381
1000, 100, 10, ?divide by 101

Puzzle 3: growing steps

SequenceDifferencesNext
1, 4, 9, 16, ?+3, +5, +725
3, 6, 10, 15, ?+3, +4, +521
1, 1, 2, 3, 5, ?add last two8

Pause and predict

Sequence: 4, 7, 12, 19, 28, ?
Differences: +3, +5, +7, +9
Next difference: +11
Answer: 39

Quick answers

What comes after 4, 7, 12, 19, 28?

39, because the differences grow by 2.

Why can 1, 2, 4 be tricky?

The next could be 8 by doubling or 7 by growing steps.

KwickClips from this lesson

Short clips, one idea each. Good for revision the night before.

The full lesson, in text

Hello students, welcome to Kwickprep. Two, four, eight, sixteen. What comes next? If you said thirty two, you just did what AI does all day. Today we learn why patterns sit at the heart of AI. We solve number and picture puzzles, and connect them to machine learning.

First, what is a pattern? A pattern is something that repeats, or changes by a fixed rule. We find patterns in numbers, shapes, sounds and even words. For example, the days of the week repeat every seven days. Once you know the rule of a pattern, you can predict what comes next.

Why do patterns matter so much in AI? Most modern AI learns rules from data, instead of a person typing every rule. Once it finds a pattern, it can predict new cases. Spam filters, face unlock on phones and weather forecasts all work by spotting patterns. If data has no pattern at all, there is nothing for the AI to learn.

Here is a step by step method for number puzzles. First, find the difference between each pair of neighbouring numbers. Next, ask, are all the differences the same? If yes, the rule is to add that number each time. If no, try other ideas, like multiplying, or square numbers. Then check that your rule works for every term, not just the first two. Finally, use the rule to predict the next term.

Let us solve some puzzles. Five, nine, thirteen, seventeen, what next? Each difference is plus four, so the next number is twenty one. Fifty, forty five, forty, thirty five, what next? Each step is minus five, so the answer is thirty. When the difference stays the same, just add it again.

Some sequences grow too fast for adding. Two, four, eight, sixteen: each number is double the one before, so the next is thirty two. Three, nine, twenty seven: each is three times the last, so the next is eighty one. One thousand, one hundred, ten: each is divided by ten, so the next is one.

Now some trickier ones. One, four, nine, sixteen are the square numbers. Their differences are three, five and seven, odd numbers growing by two, so next is twenty five. Three, six, ten, fifteen: the differences grow by one each time, plus three, plus four, plus five, so next is twenty one. One, one, two, three, five: each number is the sum of the two before it, so next is eight.

Pause and predict. What comes after four, seven, twelve, nineteen, twenty eight? Find the differences first: plus three, plus five, plus seven, plus nine. The differences grow by two, so the next difference is plus eleven. Twenty eight plus eleven gives thirty nine.

Now picture puzzles, called analogies. They are written as A, colon, B, double colon, C, colon, question mark. We read it as, A is to B, as C is to what? First, find what changed from picture A to picture B. Then apply exactly the same change to picture C.

Let us solve three picture puzzles. An empty circle becomes a filled circle, so the change is filling in colour, and an empty square becomes a filled square. An arrow pointing up turns to point right, which is a quarter turn clockwise, so an arrow pointing left turns to point up. A triangle becomes a square, adding one side, so a pentagon becomes a hexagon.

In picture puzzles, only a few kinds of change happen. Rotation means the shape turns, so watch its direction. Size means the shape grows or shrinks. Count means the number of items changes, like two dots becoming three. Colour or fill means empty shapes become shaded. Position means the shape moves, like from left to right.

Now let us connect this to machine learning. You look at a few examples, while a machine learning model looks at thousands, like photos of cats. You guess a rule in your head, while the model adjusts many internal numbers to capture the rule. You check your rule on another term, and the model is tested on new data it has not seen. Finally, both of you predict new cases, like, is this photo a cat?

Patterns can also mislead us. With too few examples, we may pick the wrong rule. For one, two, four, the next could be eight, by doubling, or seven, by adding one more each time. Machines can also find false patterns in small or biased data. That is why AI needs lots of good, varied data to learn the right rule.

Let us revise what we learned today. A pattern is something that repeats or changes by a rule. For number puzzles, check the differences first, then try multiplying or squares. For picture puzzles, find the change from A to B, then apply it to C. AI learns patterns from data so it can predict new cases. And the more good data it has, the better the patterns it finds.

Courses that teach this

CourseUnit
CBSE Class 9 Artificial Intelligence (417)Part B - Unit 3: Math for AI (Statistics & Probability)

Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.

Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.

Want a plan that actually fits your board dates?

Ask Kajal Ma'am directly, 20+ years teaching computer science. Free demo class first, no payment.

Talk to Kajal Ma'am on WhatsApp

Or see the Class 12 Computer Science course →

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →