Skip to content

An AI skill that turns books into animated, narrated, interactive web experiences

feat(math): add multiples and LCM chapter

yzrad8bc11d0189
diff --git a/site/index.html b/site/index.html
index aca4623..47a1d24 100644
--- a/site/index.html
+++ b/site/index.html
@@ -23,8 +23,8 @@
<a class="book-hotspot algebra-book" data-book="elementary-algebra" href="elementary-algebra/" aria-label="Open Elementary Algebra, 68 narrated chapters">
<span class="book-caption"><strong>Elementary Algebra <span aria-hidden="true">↗</span></strong><small>68 narrated chapters</small></span>
</a>
- <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 4 narrated chapters">
- <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>4 narrated chapters</small></span>
+ <a class="book-hotspot math-book" data-book="math-notebook" href="math-notebook/" aria-label="Open Elementary Mathematics, 5 narrated chapters">
+ <span class="book-caption"><strong>Elementary Mathematics <span aria-hidden="true">↗</span></strong><small>5 narrated chapters</small></span>
</a>
<span class="physics-pending">Physics · Coming soon</span>
</section>
diff --git a/site/lib/bookshelf.js b/site/lib/bookshelf.js
index b51eeb7..70c5ca7 100644
--- a/site/lib/bookshelf.js
+++ b/site/lib/bookshelf.js
@@ -17,7 +17,7 @@
const books = [
{ id: 'elementary-algebra', key: 'progress', chapterBase: 'elementary-algebra/', chapters: 68 },
{ id: 'math-notebook', key: 'animebook:progress:' + new URL('math-notebook/', location.href).pathname,
- chapterBase: 'math-notebook/', chapters: 4 },
+ chapterBase: 'math-notebook/', chapters: 5 },
];
for (const book of books) {
const cover = document.querySelector(`[data-book="${book.id}"]`);
diff --git a/site/math-notebook/ch04/index.html b/site/math-notebook/ch04/index.html
index 670fb40..e65a68c 100644
--- a/site/math-notebook/ch04/index.html
+++ b/site/math-notebook/ch04/index.html
@@ -22,7 +22,7 @@
<script src="audio/en/timings.js"></script>
<script>
'use strict';
-const CHAPTER = { number: 4, title: 'Factors and Greatest Common Factor', minutes: 11, language: 'en' };
+const CHAPTER = { number: 4, title: 'Factors and Greatest Common Factor', minutes: 11, language: 'en', next: '../ch05/' };
const FC_ROW = COL.whole, FC_SIZE = COL.nat;
const fcText = (p,s,x,y,t=0,size=32,col=COL.chalk,anchor='start') => { const e=T(p,s,{x,y,size,fill:col,anchor,o:0}); show(e,t); return e; };
const fcMath = (p,s,x,y,t=0,size=44,col=COL.chalk,anchor='middle') => { const e=M(p,[s],{x,y,size,fill:col,anchor,o:0}); show(e,t); return e; };
diff --git a/site/math-notebook/ch05/audio/en/bundles.mp3 b/site/math-notebook/ch05/audio/en/bundles.mp3
new file mode 100644
index 0000000..bc57036
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/bundles.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/coins.mp3 b/site/math-notebook/ch05/audio/en/coins.mp3
new file mode 100644
index 0000000..0fbb36e
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/coins.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/common.mp3 b/site/math-notebook/ch05/audio/en/common.mp3
new file mode 100644
index 0000000..a3b5324
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/common.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/divides.mp3 b/site/math-notebook/ch05/audio/en/divides.mp3
new file mode 100644
index 0000000..af7b39e
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/divides.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/final1.mp3 b/site/math-notebook/ch05/audio/en/final1.mp3
new file mode 100644
index 0000000..dcafef8
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/final1.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/final2.mp3 b/site/math-notebook/ch05/audio/en/final2.mp3
new file mode 100644
index 0000000..a0d3ff0
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/final2.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/final3.mp3 b/site/math-notebook/ch05/audio/en/final3.mp3
new file mode 100644
index 0000000..dde8155
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/final3.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/finish.mp3 b/site/math-notebook/ch05/audio/en/finish.mp3
new file mode 100644
index 0000000..f1516a6
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/finish.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/hops.mp3 b/site/math-notebook/ch05/audio/en/hops.mp3
new file mode 100644
index 0000000..1b06425
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/hops.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/intro.mp3 b/site/math-notebook/ch05/audio/en/intro.mp3
new file mode 100644
index 0000000..a8a0b30
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/intro.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/least.mp3 b/site/math-notebook/ch05/audio/en/least.mp3
new file mode 100644
index 0000000..421cdb9
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/least.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/nines.mp3 b/site/math-notebook/ch05/audio/en/nines.mp3
new file mode 100644
index 0000000..7aa1f53
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/nines.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/q1.mp3 b/site/math-notebook/ch05/audio/en/q1.mp3
new file mode 100644
index 0000000..55d26cb
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/q1.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/q2.mp3 b/site/math-notebook/ch05/audio/en/q2.mp3
new file mode 100644
index 0000000..516a047
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/q2.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/q3.mp3 b/site/math-notebook/ch05/audio/en/q3.mp3
new file mode 100644
index 0000000..58889d4
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/q3.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/schedule.mp3 b/site/math-notebook/ch05/audio/en/schedule.mp3
new file mode 100644
index 0000000..175ccfa
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/schedule.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/shortcut.mp3 b/site/math-notebook/ch05/audio/en/shortcut.mp3
new file mode 100644
index 0000000..39c86c1
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/shortcut.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/timings.js b/site/math-notebook/ch05/audio/en/timings.js
new file mode 100644
index 0000000..f63173f
--- /dev/null
+++ b/site/math-notebook/ch05/audio/en/timings.js
@@ -0,0 +1,651 @@
+window.TIMINGS = {
+ "intro": {
+ "dur": 10.176,
+ "marks": {
+ "sub": 3.919
+ },
+ "cues": [
+ [
+ 0.091,
+ "Chapter five."
+ ],
+ [
+ 1.289,
+ "Multiples and least common multiple."
+ ],
+ [
+ 3.919,
+ "When two patterns repeat, when will they line up?"
+ ],
+ [
+ 7.214,
+ "We can see the answer by letting equal groups grow."
+ ]
+ ]
+ },
+ "bundles": {
+ "dur": 29.712,
+ "marks": {
+ "one": 6.862,
+ "two": 10.052,
+ "three": 13.789,
+ "four": 15.833,
+ "rule": 23.424
+ },
+ "cues": [
+ [
+ 0.091,
+ "A multiple is the total made from a whole number of equal groups."
+ ],
+ [
+ 4.062,
+ "Here, each bundle holds four dots."
+ ],
+ [
+ 6.862,
+ "One bundle gives four times one, or four."
+ ],
+ [
+ 10.052,
+ "Add another complete bundle."
+ ],
+ [
+ 11.875,
+ "Four times two gives eight."
+ ],
+ [
+ 13.789,
+ "Three bundles give twelve, and four bundles give sixteen."
+ ],
+ [
+ 17.891,
+ "Notice what changes: the number of bundles."
+ ],
+ [
+ 20.938,
+ "The size of each bundle stays four."
+ ],
+ [
+ 23.424,
+ "That is why each total is a multiple of four."
+ ],
+ [
+ 26.51,
+ "We can keep adding complete bundles for as long as we like."
+ ]
+ ]
+ },
+ "hops": {
+ "dur": 34.728,
+ "marks": {
+ "jump": 3.034,
+ "more": 9.102,
+ "zero": 19.453,
+ "endless": 28.997
+ },
+ "cues": [
+ [
+ 0.104,
+ "We can turn those bundles into equal jumps."
+ ],
+ [
+ 3.034,
+ "Each jump covers four units on this track."
+ ],
+ [
+ 5.964,
+ "We land on four, then eight, then twelve."
+ ],
+ [
+ 9.102,
+ "Keep jumping: sixteen, twenty, twenty four."
+ ],
+ [
+ 12.839,
+ "The landing points are multiples of four because every distance is a whole number of four unit jumps."
+ ],
+ [
+ 19.453,
+ "For this chapter, our list starts with one group."
+ ],
+ [
+ 22.578,
+ "We are listing positive multiples, so zero is the starting point, not an answer in the list."
+ ],
+ [
+ 28.997,
+ "There is no last multiple."
+ ],
+ [
+ 31.081,
+ "One more complete jump always creates another."
+ ]
+ ]
+ },
+ "q1": {
+ "dur": 5.376,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.159,
+ "Choose the total made entirely from complete bundles of four."
+ ]
+ ]
+ },
+ "common": {
+ "dur": 31.776,
+ "marks": {
+ "four": 4.505,
+ "six": 6.836,
+ "match": 11.654,
+ "next": 21.758
+ },
+ "cues": [
+ [
+ 0.104,
+ "Now compare two repeating patterns on the same scale."
+ ],
+ [
+ 4.505,
+ "The blue track jumps four at a time."
+ ],
+ [
+ 6.836,
+ "The coral track jumps six at a time."
+ ],
+ [
+ 9.466,
+ "Watch where their landing points line up."
+ ],
+ [
+ 11.654,
+ "Twelve is a landing point on both tracks."
+ ],
+ [
+ 14.701,
+ "Three jumps of four cover the same distance as two jumps of six."
+ ],
+ [
+ 19.505,
+ "Twelve is a common multiple."
+ ],
+ [
+ 21.758,
+ "Twenty four is another shared landing point: six jumps of four, or four jumps of six."
+ ],
+ [
+ 28.411,
+ "Common means the total works for both group sizes."
+ ]
+ ]
+ },
+ "least": {
+ "dur": 34.104,
+ "marks": {
+ "first": 5.846,
+ "later": 11.12,
+ "zero": 15.807,
+ "name": 23.06
+ },
+ "cues": [
+ [
+ 0.104,
+ "We have two common multiples here, twelve and twenty four."
+ ],
+ [
+ 4.297,
+ "Which one comes first?"
+ ],
+ [
+ 5.846,
+ "Reading from left to right, twelve is the first positive shared landing point."
+ ],
+ [
+ 11.12,
+ "Twenty four works too, but it is larger."
+ ],
+ [
+ 14.089,
+ "Least means smallest."
+ ],
+ [
+ 15.807,
+ "The tracks begin together at zero, but we are looking for a positive total: at least one jump on each track."
+ ],
+ [
+ 23.06,
+ "The least common multiple of four and six is twelve."
+ ],
+ [
+ 26.81,
+ "We shorten that name to L C M."
+ ],
+ [
+ 29.427,
+ "It is the smallest positive total that both patterns can reach exactly."
+ ]
+ ]
+ },
+ "q2": {
+ "dur": 4.368,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.146,
+ "Choose the least common multiple on the paired tracks."
+ ]
+ ]
+ },
+ "nines": {
+ "dur": 39.624,
+ "marks": {
+ "nine": 6.615,
+ "eleven": 16.419,
+ "match": 23.802
+ },
+ "cues": [
+ [
+ 0.104,
+ "Sometimes the first match is farther along."
+ ],
+ [
+ 3.073,
+ "Let's list positive multiples of nine and eleven."
+ ],
+ [
+ 6.615,
+ "For nine, add nine each time: nine, eighteen, twenty seven, and so on."
+ ],
+ [
+ 12.812,
+ "After eighty one comes ninety, then ninety nine."
+ ],
+ [
+ 16.419,
+ "For eleven, add eleven each time: eleven, twenty two, thirty three, through ninety nine."
+ ],
+ [
+ 23.802,
+ "The first number appearing in both rows is ninety nine."
+ ],
+ [
+ 27.539,
+ "Nine times eleven and eleven times nine both give ninety nine."
+ ],
+ [
+ 31.927,
+ "The least common multiple is ninety nine."
+ ],
+ [
+ 34.609,
+ "A list must include every step, even when the answer is near the end."
+ ]
+ ]
+ },
+ "shortcut": {
+ "dur": 39.816,
+ "marks": {
+ "start": 2.721,
+ "test": 13.203,
+ "whole": 22.07,
+ "stop": 28.75
+ },
+ "cues": [
+ [
+ 0.104,
+ "We do not always need two long lists."
+ ],
+ [
+ 2.721,
+ "Start with multiples of the larger number, eleven."
+ ],
+ [
+ 6.042,
+ "Every candidate already passes the eleven test."
+ ],
+ [
+ 9.362,
+ "Now ask whether it also divides into whole groups of nine."
+ ],
+ [
+ 13.203,
+ "Eleven, twenty two, thirty three, and the next candidates all leave a remainder when divided by nine."
+ ],
+ [
+ 19.961,
+ "Even eighty eight fails."
+ ],
+ [
+ 22.07,
+ "Ninety nine divided by nine equals eleven, a whole number."
+ ],
+ [
+ 26.263,
+ "So ninety nine passes both tests."
+ ],
+ [
+ 28.75,
+ "Because we tested the candidates in increasing order, the first one that passes must be the least common multiple."
+ ],
+ [
+ 35.625,
+ "This is the same idea as matching lists, with less writing."
+ ]
+ ]
+ },
+ "divides": {
+ "dur": 33.096,
+ "marks": {
+ "eighteen": 5.781,
+ "small": 15.182,
+ "rule": 24.505
+ },
+ "cues": [
+ [
+ 0.078,
+ "A useful case appears when one number already divides the other."
+ ],
+ [
+ 4.232,
+ "Look at six and eighteen."
+ ],
+ [
+ 5.781,
+ "Eighteen is one jump on the coral track."
+ ],
+ [
+ 8.854,
+ "It is also three jumps on the blue track."
+ ],
+ [
+ 12.083,
+ "So eighteen is already a common multiple."
+ ],
+ [
+ 15.182,
+ "No smaller positive multiple of eighteen exists: its list begins with eighteen."
+ ],
+ [
+ 20.924,
+ "That proves the least common multiple is eighteen."
+ ],
+ [
+ 24.505,
+ "When the larger number is a multiple of the smaller, the L C M is the larger number."
+ ],
+ [
+ 30.247,
+ "We do not have to multiply the two numbers together."
+ ]
+ ]
+ },
+ "triple": {
+ "dur": 30.168,
+ "marks": {
+ "six": 6.51,
+ "twelve": 13.346,
+ "all": 18.646
+ },
+ "cues": [
+ [
+ 0.117,
+ "Common multiples can belong to more than two numbers."
+ ],
+ [
+ 3.711,
+ "Try three, four, and six."
+ ],
+ [
+ 6.51,
+ "Six works for three and six, but it does not work for four."
+ ],
+ [
+ 10.234,
+ "So matching just two rows is not enough."
+ ],
+ [
+ 13.346,
+ "Twelve is four groups of three, three groups of four, and two groups of six."
+ ],
+ [
+ 18.646,
+ "All three rows reach twelve."
+ ],
+ [
+ 21.185,
+ "Since no smaller positive total works for all three, their least common multiple is twelve."
+ ],
+ [
+ 27.643,
+ "Always check every number named in the problem."
+ ]
+ ]
+ },
+ "schedule": {
+ "dur": 38.064,
+ "marks": {
+ "start": 7.93,
+ "five": 14.518,
+ "six": 20.299,
+ "meet": 23.49
+ },
+ "cues": [
+ [
+ 0.104,
+ "Two bikes are inspected on the same starting day."
+ ],
+ [
+ 2.982,
+ "One needs inspection every four days; the other every ten days."
+ ],
+ [
+ 7.93,
+ "Call the shared starting day day zero."
+ ],
+ [
+ 10.456,
+ "We want the first day after that start when both need inspection."
+ ],
+ [
+ 14.518,
+ "The blue bike reaches days four, eight, twelve, sixteen, and twenty."
+ ],
+ [
+ 20.299,
+ "The coral bike reaches days ten and twenty."
+ ],
+ [
+ 23.49,
+ "The first shared inspection is twenty days later."
+ ],
+ [
+ 26.523,
+ "Twenty equals five groups of four days and two groups of ten days."
+ ],
+ [
+ 31.328,
+ "Repeating schedules line up at common multiples, and the first shared return uses the least one."
+ ]
+ ]
+ },
+ "q3": {
+ "dur": 5.448,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Quick check."
+ ],
+ [
+ 1.133,
+ "Choose the earliest day when both bikes need inspection together."
+ ]
+ ]
+ },
+ "coins": {
+ "dur": 43.92,
+ "marks": {
+ "eight": 12.552,
+ "six": 19.375,
+ "total": 29.076,
+ "why": 35.156
+ },
+ "cues": [
+ [
+ 0.091,
+ "Least common multiple also solves a problem about equal totals."
+ ],
+ [
+ 4.635,
+ "Two collectors have the same number of coins."
+ ],
+ [
+ 7.318,
+ "One sorts complete groups of six; the other sorts complete groups of eight."
+ ],
+ [
+ 12.552,
+ "Try totals from the eight list: eight and sixteen."
+ ],
+ [
+ 16.289,
+ "Neither can split entirely into sixes."
+ ],
+ [
+ 19.375,
+ "Twenty four can."
+ ],
+ [
+ 20.768,
+ "Watch the same twenty four dots become four complete groups of six."
+ ],
+ [
+ 25.534,
+ "The other row becomes three complete groups of eight."
+ ],
+ [
+ 29.076,
+ "Each collector has twenty four coins."
+ ],
+ [
+ 31.641,
+ "The number of groups can differ; the total is the same."
+ ],
+ [
+ 35.156,
+ "Twenty four is the smallest total that both group sizes can build with no leftovers."
+ ],
+ [
+ 41.055,
+ "That is exactly what the L C M measures."
+ ]
+ ]
+ },
+ "wrap": {
+ "dur": 28.488,
+ "marks": {
+ "w1": 2.344,
+ "w2": 7.37,
+ "w3": 12.474,
+ "w4": 20.794
+ },
+ "cues": [
+ [
+ 0.117,
+ "Here are the ideas to keep."
+ ],
+ [
+ 2.344,
+ "A positive multiple is a whole number of equal groups, starting with one group."
+ ],
+ [
+ 7.37,
+ "Common multiples are totals that every named group size can reach."
+ ],
+ [
+ 12.474,
+ "The least common multiple is the first positive shared total."
+ ],
+ [
+ 16.836,
+ "List in order, or test the larger number's multiples."
+ ],
+ [
+ 20.794,
+ "Use it for first shared return times and smallest equal totals with complete groups."
+ ],
+ [
+ 26.484,
+ "Now try those ideas yourself."
+ ]
+ ]
+ },
+ "final1": {
+ "dur": 5.4,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, one of three."
+ ],
+ [
+ 2.188,
+ "Build two lists of positive multiples in order."
+ ]
+ ]
+ },
+ "final2": {
+ "dur": 4.704,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, two of three."
+ ],
+ [
+ 2.435,
+ "Find each least common multiple."
+ ]
+ ]
+ },
+ "final3": {
+ "dur": 8.208,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Chapter practice, three of three."
+ ],
+ [
+ 2.656,
+ "Use least common multiples to solve the repeating schedules and equal total problems."
+ ]
+ ]
+ },
+ "finish": {
+ "dur": 9.024,
+ "marks": {},
+ "cues": [
+ [
+ 0.104,
+ "Chapter complete."
+ ],
+ [
+ 1.393,
+ "Equal groups make multiples."
+ ],
+ [
+ 3.581,
+ "The first positive total shared by all the patterns is their least common multiple."
+ ]
+ ]
+ }
+};
diff --git a/site/math-notebook/ch05/audio/en/triple.mp3 b/site/math-notebook/ch05/audio/en/triple.mp3
new file mode 100644
index 0000000..c7f8fcf
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/triple.mp3 differ
diff --git a/site/math-notebook/ch05/audio/en/wrap.mp3 b/site/math-notebook/ch05/audio/en/wrap.mp3
new file mode 100644
index 0000000..a896621
Binary files /dev/null and b/site/math-notebook/ch05/audio/en/wrap.mp3 differ
diff --git a/site/math-notebook/ch05/index.html b/site/math-notebook/ch05/index.html
new file mode 100644
index 0000000..bb3ba2b
--- /dev/null
+++ b/site/math-notebook/ch05/index.html
@@ -0,0 +1,70 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>Multiples and Least Common Multiple — Elementary Mathematics</title>
+<link rel="stylesheet" href="../lib/engine.css">
+<link rel="expect" href="#bar" blocking="render">
+<style>.screen .blanks .line{gap:12px}.screen input.box{min-width:78px}</style>
+</head>
+<body>
+<script src="../lib/engine.js"></script>
+<script src="audio/en/timings.js"></script>
+<script>
+'use strict';
+const CHAPTER = { number: 5, title: 'Multiples and Least Common Multiple', minutes: 10, language: 'en' };
+const MC_A=COL.whole,MC_B=COL.nat;
+const mcText=(p,s,x,y,t=0,size=32,col=COL.chalk,anchor='start')=>{const e=T(p,s,{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
+const mcMath=(p,s,x,y,t=0,size=44,col=COL.chalk,anchor='middle')=>{const e=M(p,[s],{x,y,size,fill:col,anchor,o:0});show(e,t);return e;};
+function mcTitle(p,s,sub=''){mcText(p,s,100,120,.1,44);if(sub)mcText(p,sub,100,174,.25,27,COL.dim);}
+function mcChip(p,v,x,y,t=0,col=COL.task,w=80){const g=G(p,{x,y,o:0});mk('rect',{x:-w/2,y:-30,width:w,height:60,rx:12,fill:COL.board,stroke:col,'stroke-width':2},g);T(g,String(v),{y:12,size:34,fill:col,anchor:'middle'});show(g,t);return g;}
+function mcDots(p,n,cx,cy,cols,gap=35,col=COL.chalk,t=.2){const rows=Math.ceil(n/cols);return Array.from({length:n},(_,i)=>{const e=G(p,{x:cx+(i%cols-(cols-1)/2)*gap,y:cy+(Math.floor(i/cols)-(rows-1)/2)*gap,o:0});mk('circle',{r:9,fill:col},e);show(e,t+i*.015);return e;});}
+function mcBundle(p,cx,cy,t){const g=G(p,{x:cx,y:cy,o:0});mk('rect',{x:-70,y:-70,width:140,height:140,rx:16,fill:'none',stroke:MC_A,'stroke-width':2.5},g);[-24,24].forEach(x=>[-24,24].forEach(y=>mk('circle',{cx:x,cy:y,r:11,fill:MC_A},g)));show(g,t);return g;}
+function mcTrack(p,step,max,y,col,t=.2,{label=String(step),arcs=true,ends=true}={}){
+ const x=v=>240+v/max*1160;const g=G(p);mcText(g,label,135,y+12,.2,36,col,'middle');
+ path(g,`M240 ${y}H1420`,{stroke:COL.faint,'stroke-width':2});
+ for(let v=0;v<=max;v++)path(g,`M${x(v)} ${y-5}V${y+5}`,{stroke:COL.faint,'stroke-width':1});
+ mcText(g,'0',240,y+48,.2,27,COL.dim,'middle');const points=[];
+ for(let v=step;v<=max;v+=step){const start=t+(v/step-1)*.25;
+ if(arcs)draw(path(g,`M${x(v-step)} ${y-10}Q${(x(v-step)+x(v))/2} ${y-85} ${x(v)} ${y-10}`,{stroke:col,'stroke-width':3,fill:'none'},{d:0}),start,.6);
+ const dot=G(g,{x:x(v),y,o:0});mk('circle',{r:9,fill:col},dot);show(dot,start+.4);
+ if(ends)mcText(g,String(v),x(v),y+48,start+.4,28,col,'middle');points.push({v,el:dot});
+ }
+ return {g,x,points};
+}
+function mcPairTracks(p,a,b,max,ta=.2,tb=.2,match=.2){
+ const A=mcTrack(p,a,max,310,MC_A,ta),B=mcTrack(p,b,max,475,MC_B,tb),shared=[];
+ for(let v=1;v<=max;v++)if(v%a===0&&v%b===0){const x=A.x(v);draw(path(p,`M${x} 327V330M${x} 374V457`,{stroke:COL.task,'stroke-width':3,'stroke-dasharray':'7 7'},{d:0}),match,.6);const el=mcChip(p,v,x,610,match+.4);shared.push({el,v,box:[x-46,572,92,77],label:`Shared positive endpoint ${v}`});}
+ return {A,B,shared};
+}
+function mcCoinGroups(dots,size,cy,t){const ng=dots.length/size,groupGap=1000/ng,inside=size===6?22:21;dots.forEach((e,i)=>{const k=Math.floor(i/size),j=i%size;tw(e,{x:300+k*groupGap+(j-(size-1)/2)*inside,y:cy},t+i*.018,1.1,io);});}
+const BEATS=[
+['intro','Multiples and LCM',(m,D)=>{const g=G(scene,{o:0,y:24});T(g,'Unit 1 · The Number System · Chapter 5',{x:800,y:260,size:28,fill:COL.dim,anchor:'middle'});T(g,'Multiples and',{x:800,y:370,size:82,weight:600,anchor:'middle'});T(g,'Least Common Multiple',{x:800,y:470,size:76,weight:600,anchor:'middle'});tw(g,{o:1,y:0},.2,1.1,out);[4,6].forEach((n,i)=>mcDots(g,n,680+i*240,555,n,26,i?MC_B:MC_A,.8));const s=mcText(scene,'When will repeating patterns line up?',800,700,m('sub'),34,COL.dim,'middle');hide(g,D-.8,.7);hide(s,D-.8,.7);}],
+['bundles','Build multiples from equal groups',m=>{const p=panel(0);mcTitle(p,'Grow the number of bundles','Every complete bundle holds 4 dots.');[350,650,950,1250].forEach((x,i)=>mcBundle(p,x,360,i?m(['one','two','three','four'][i]):.2));const keys=['one','two','three','four'];keys.forEach((key,i)=>{const g=G(p,{o:0}),x2=420+i*300;path(g,`M280 450v16h${x2-280}v-16`,{stroke:MC_A,'stroke-width':3});T(g,`${i+1} ${i?'bundles':'bundle'} so far`,{x:(280+x2)/2,y:515,size:30,fill:MC_A,anchor:'middle'});M(g,[`4 × ${i+1} = ${4*(i+1)}`],{x:800,y:605,size:52,fill:MC_A,anchor:'middle'});show(g,m(key));if(i<3)hide(g,m(keys[i+1]));});mcText(p,'4, 8, 12, 16, …',800,730,m('rule'),48,COL.task,'middle');mcText(p,'Each total is a whole number of complete bundles.',800,810,m('rule',2),31,COL.dim,'middle');}],
+['hops','Equal jumps make multiples',m=>{const p=panel(0);mcTitle(p,'Multiples are equal-jump landing points','The track is drawn to scale: every tick is 1 unit.');mcTrack(p,4,24,425,MC_A,m('jump'));mcText(p,'4, 8, 12',800,610,m('jump',3),45,MC_A,'middle');mcText(p,'16, 20, 24',800,685,m('more'),45,MC_A,'middle');mcText(p,'Positive list starts at 4, not 0.',800,765,m('zero'),32,COL.task,'middle');mcText(p,'… another jump is always possible',800,825,m('endless'),30,COL.dim,'middle');}],
+['q1','Quick check',()=>{const p=panel(0);mcTitle(p,'Which total is made of complete groups of 4?');S.mcBundles=[10,12,14].map((n,k)=>{const g=G(p);const cx=360+k*430;for(let j=0;j<Math.floor(n/4);j++)mcBundle(g,cx+(j-1)*100,370,.2);const dots=g.querySelectorAll('circle');dots.forEach(e=>e.setAttribute('r','7'));g.querySelectorAll('rect').forEach((e,j)=>{e.setAttribute('x',String(-45));e.setAttribute('width','90');e.setAttribute('y','-52');e.setAttribute('height','104');});if(n%4)mcDots(g,n%4,cx,490,2,38,COL.chalk,.3);mcText(g,`${n} dots`,cx,595,.3,34,COL.chalk,'middle');return {el:g,box:[cx-170,295,340,265],label:`${n} dots: ${Math.floor(n/4)} groups of four${n%4?' plus two leftovers':''}`};});},{ask:done=>quiz(BAND,[{id:'c-bundles',prompt:'Click the picture with no dots left outside its bundles.',build:pickEls(S.mcBundles,1,'12 = 3 × 4: three complete bundles, with no leftovers.',i=>`${i===0?10:14} leaves 2 dots outside the complete bundles. A multiple of 4 needs no leftovers.`,()=>pulseFx(S.mcBundles[1].el,1.1))}],done)}],
+['common','Two patterns share endpoints',m=>{const p=panel(0);mcTitle(p,'Same scale. Different jump sizes.','Blue: groups of 4 Coral: groups of 6');mcPairTracks(p,4,6,24,m('four'),m('six'),m('match'));mcMath(p,'3 × 4 = 2 × 6 = 12',800,735,m('match',1),42,COL.task);mcText(p,'24 is shared too: 6 × 4 = 4 × 6',800,810,m('next'),32,COL.dim,'middle');}],
+['least','Least means first positive match',m=>{const p=panel(0);mcTitle(p,'Read shared totals from smallest to largest');const q=mcPairTracks(p,4,6,24,.2,.2,.4);const first=q.shared[0].el;pulse(first,m('first'),1.25);draw(path(p,`M${q.A.x(12)-58} 565h116v90h-116Z`,{stroke:COL.task,'stroke-width':4},{d:0}),m('first'),.6);pulse(q.shared[1].el,m('later'),1.1);mcText(p,'0 = start; use positive totals',800,745,m('zero'),32,COL.dim,'middle');mcText(p,'LCM(4, 6) = 12',800,815,m('name'),46,COL.task,'middle');}],
+['q2','Quick check',()=>{const p=panel(0);mcTitle(p,'Which shared endpoint is the least common multiple?');S.mcShared=mcPairTracks(p,4,6,24,.2,.2,.2).shared;},{ask:done=>quiz(BAND,[{id:'c-first',prompt:'Choose the first positive total reached by BOTH tracks.',build:pickEls(S.mcShared,0,'12 is the first positive match: 3 × 4 = 2 × 6.',()=> '24 works for both tracks, but 12 is a smaller positive match.',()=>pulseFx(S.mcShared[0].el,1.3))}],done)}],
+['nines','Lists meet at ninety-nine',m=>{const p=panel(0);mcTitle(p,'Find the first shared value','Add the same group size at every step.');mcText(p,'9',110,350,.2,42,MC_A);mcText(p,'11',110,505,.2,42,MC_B);Array.from({length:11},(_,i)=>mcChip(p,9*(i+1),230+i*108,335,i?m('nine')+i*.22:.2,MC_A,72));const b=Array.from({length:9},(_,i)=>mcChip(p,11*(i+1),230+i*108,490,i?m('eleven')+i*.22:.2,MC_B,72));tw(b[8],{x:1310},m('match'),1,io);draw(path(p,'M1310 371V454',{stroke:COL.task,'stroke-width':4},{d:0}),m('match',1),.5);mcText(p,'81 → 90 → 99: do not skip a step',800,665,m('nine',3),32,COL.dim,'middle');mcText(p,'LCM(9, 11) = 99',800,780,m('match',1.5),48,COL.task,'middle');}],
+['shortcut','Test the larger-number list',m=>{const p=panel(0);mcTitle(p,'One ordered list can do the job','Every candidate is already a multiple of 11.');const vals=Array.from({length:9},(_,i)=>11*(i+1));vals.forEach((v,i)=>{const x=300+(i%5)*245,y=i<5?335:520;const el=mcChip(p,v,x,y,i?m('start')+i*.12:.2,i===8?COL.task:MC_B,96);if(i<8)mcText(p,'remainder',x,y+70,m('test')+i*.25,25,COL.dim,'middle');else pulse(el,m('whole'),1.2);});mcMath(p,'99 ÷ 9 = 11',800,730,m('whole'),48,COL.task);mcText(p,'First candidate that passes both → LCM',800,815,m('stop'),34,COL.dim,'middle');}],
+['divides','When one number divides the other',m=>{const p=panel(0);mcTitle(p,'What if the larger number already works?','Blue: groups of 6 Coral: groups of 18');mcPairTracks(p,6,18,36,.2,m('eighteen'),m('eighteen',1));mcMath(p,'18 = 3 × 6',750,730,m('eighteen',1.5),46,COL.task);mcText(p,'18 is the smallest positive multiple of 18.',800,795,m('small'),32,COL.dim,'middle');mcText(p,'LCM(6, 18) = 18',800,850,m('rule'),36,COL.task,'middle');}],
+['triple','Common means every row',m=>{const p=panel(0);mcTitle(p,'Three group sizes: 3, 4, and 6');const a=mcTrack(p,3,12,290,MC_A,.2),b=mcTrack(p,4,12,460,MC_B,.2),c=mcTrack(p,6,12,630,COL.chalk,.2);const x=a.x(6);draw(path(p,`M${x} 355V605`,{stroke:COL.task,'stroke-width':2,'stroke-dasharray':'7 8'},{d:0}),m('six'),.5);mcText(p,'6 misses the 4 row',710,545,m('six',1),28,COL.task,'end');draw(path(p,'M1400 305V308M1400 354V478M1400 524V615',{stroke:COL.task,'stroke-width':4},{d:0}),m('twelve'),.6);mcText(p,'4 × 3 = 3 × 4 = 2 × 6 = 12',800,755,m('twelve'),39,COL.task,'middle');mcText(p,'LCM(3, 4, 6) = 12',800,825,m('all'),42,COL.task,'middle');}],
+['schedule','The first shared inspection',m=>{const p=panel(0);mcTitle(p,'Two bikes. One shared inspection day.','Blue: inspect every 4 days Coral: inspect every 10 days');mcText(p,'start together',240,235,m('start'),27,COL.dim,'middle');mcPairTracks(p,4,10,20,m('five'),m('six'),m('meet'));mcText(p,'Day 20: 5 × 4 = 2 × 10',800,750,m('meet',1),44,COL.task,'middle');mcText(p,'20 days after their shared starting day',800,820,m('meet',3),32,COL.dim,'middle');}],
+['q3','Quick check',()=>{const p=panel(0);mcTitle(p,'When do both bikes first need inspection together?','Blue: every 4 days. Coral: every 10 days.');const A=mcTrack(p,4,20,310,MC_A,.2),B=mcTrack(p,10,20,475,MC_B,.2);S.mcDays=[4,8,12,16,20].map(v=>{const el=mcChip(p,v,A.x(v),610,.4,COL.task,70);return {el,v,box:[A.x(v)-41,573,82,75],label:`Day ${v}`};});},{ask:done=>quiz(BAND,[{id:'c-reunion',prompt:'Pick the earliest positive day that appears on both inspection tracks.',build:pickEls(S.mcDays,4,'Day 20 is the first shared inspection: five 4-day periods, or two 10-day periods.',i=>`Day ${S.mcDays[i].v} is on the four-day track, but it is not divisible by 10.`,()=>pulseFx(S.mcDays[4].el,1.3))}],done)}],
+['coins','The smallest equal total',m=>{const p=panel(0);mcTitle(p,'Equal totals. Different complete groups.','Blue collector: groups of 6 Coral collector: groups of 8');mcText(p,'8, 16',420,250,m('eight'),36,MC_B,'middle');mcText(p,'neither divides into whole groups of 6',1020,250,m('eight',1),29,COL.dim,'middle');const aa=mcDots(p,24,800,400,12,38,MC_A,.2),bb=mcDots(p,24,800,590,12,38,MC_B,.2);mcCoinGroups(aa,6,390,m('six'));mcCoinGroups(bb,8,590,m('six'));[6,8].forEach((size,r)=>{const ng=24/size,cy=r?590:390;for(let k=0;k<ng;k++){const x=300+k*1000/ng;const g=G(p,{o:0});mk('rect',{x:x-size*24/2,y:cy-36,width:size*24,height:72,rx:12,fill:'none',stroke:r?MC_B:MC_A,'stroke-width':2},g);show(g,m('six',1));}});mcText(p,'4 groups of 6 = 24',800,480,m('total'),32,MC_A,'middle');mcText(p,'3 groups of 8 = 24',800,680,m('total',1),32,MC_B,'middle');mcText(p,'24 coins for EACH collector',800,760,m('total',2),42,COL.task,'middle');mcText(p,'Smallest shared total, with no leftovers.',800,830,m('why'),31,COL.dim,'middle');}],
+['wrap','Summary',m=>{const p=panel(0);[['Multiples: totals of complete equal groups.','w1'],['Common multiples: totals every group size can reach.','w2'],['LCM: first positive shared total.','w3'],['Use it: first reunions and smallest equal totals.','w4']].forEach(([s,k],i)=>{const g=G(p,{x:-16,y:260+i*140,o:0});mk('circle',{cx:155,cy:-12,r:26,fill:COL.task},g);T(g,String(i+1),{x:155,y:-1,size:30,fill:COL.board,anchor:'middle',weight:700});T(g,s,{x:215,size:35,weight:600});tw(g,{x:0,o:1},m(k),.6);});}],
+['final1','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-lists',prompt:'Write the first five positive multiples, in increasing order.',build:blanks([{parts:['7: ',{box:'7'},', ',{box:'14'},', ',{box:'21'},', ',{box:'28'},', ',{box:'35'}],why:'Start with 7 × 1 = 7; add 7 each time.',hint:'Each next total is one more complete group of 7.'},{parts:['9: ',{box:'9'},', ',{box:'18'},', ',{box:'27'},', ',{box:'36'},', ',{box:'45'}],why:'Start with 9 × 1 = 9; add 9 each time.',hint:'Start with one group, then add 9 at each step.'}])}],done,'Chapter practice 1 of 3')}],
+['final2','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[{id:'p-lcm',prompt:'Find each least common multiple.',build:blanks([{parts:['LCM(6, 10) = ',{box:'30'}],why:'10,20,30… first divides exactly by 6 at 30.'},{parts:['LCM(8, 12) = ',{box:'24'}],why:'8,16,24… meets 12,24… at 24.'},{parts:['LCM(10, 15) = ',{box:'30'}],why:'15,30… first divides exactly by 10 at 30.'},{parts:['LCM(7, 28) = ',{box:'28'}],why:'28 itself is 4 × 7; no smaller positive multiple of 28 exists.'}])}],done,'Chapter practice 2 of 3')}],
+['final3','Chapter practice',()=>panel(0),{ask:done=>quiz(SCREEN,[
+ {id:'p-visits',prompt:'Two friends start together. One visits a community workshop every 3 days, the other every 5 days. Find their first shared return.',build:blanks([{parts:[{box:'15'},' days after the start'],why:'LCM(3,5) = 15: five 3-day periods and three 5-day periods.'}])},
+ {id:'p-packages',prompt:'Two shops receive equal positive item totals. One receives complete packages of 4 items, the other packages of 10. What is the least total for each?',build:blanks([{parts:[{box:'20'},' items each'],why:'LCM(4,10) = 20: five packages of four or two packages of ten.'}])},
+ {id:'p-flowers',prompt:'Ana and Ben have equal positive flower totals. Ana makes bouquets of 5, Ben bouquets of 9, with no leftovers. Find the least total for each.',build:blanks([{parts:[{box:'45'},' flowers each'],why:'LCM(5,9) = 45 flowers: Ana has 9 bouquets, Ben 5. Flowers and bouquets are different units.'}])}
+ ],done,'Chapter practice 3 of 3')}],
+['finish','Finished',()=>panel(0),{ask:finishCard}]
+].map(([id,title,run,extra])=>({id,title,run,...extra}));
+boot();
+</script>
+</body>
+</html>
diff --git a/site/math-notebook/index.html b/site/math-notebook/index.html
index 79cdc98..e00127f 100644
--- a/site/math-notebook/index.html
+++ b/site/math-notebook/index.html
@@ -229,7 +229,7 @@ main#contents { padding-bottom: 80px; }
'use strict';
// Chapters are numbered in order through the units. Add a chapter here when its lesson is ready.
const UNITS = [ // [unit title, [[chapter title, minutes], ...]]; chapters are numbered in order. Add a chapter when its lesson is ready.
- ['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11]]],
+ ['The Number System', [['Types of Numbers and the Number Line', 9], ['Positive and Negative Numbers', 8], ['Absolute Value', 9], ['Factors and Greatest Common Factor', 11], ['Multiples and Least Common Multiple', 10]]],
];
const HUES = ['#f4a48c', '#86c9e8', '#f3c95c', '#e8a0c8', '#8fd6b0', '#bba8ee', '#f0b45a'];
const id = n => 'ch' + String(n).padStart(2, '0');