Classifying Prime and Composite Numbers

Classifying Prime and Composite Numbers
Loading the math board and drawing, please wait…
2023-06-15 04:21
This example demonstrates how to classify numbers as prime, composite, or neither using an area model. The key mathematical concepts involve the definitions of prime and composite numbers. Construction involves GeoGebra commands like RandomUniform, Take, Corner, etc. Suitable for elementary students to enhance number sense and practice.

GeoGebra Commands & Parameters

  1. RandomUniform(0, 0.99, 200) → allRandomSeeds, {0.25061870229798106, 0.7639633298111306, 0.5759326798502272, 0.07116121199711072, 0.05524626029503052, 0.54514788959775, 0.08114980591899756, 0.09711418160937234, 0.08458374435798507, 0.43715969773023733, 0.2641862150429725, 0.6486511144422494, 0.53636510127195, 0.8746945410542996, 0.9339611809377307, 0.7660321290713261, 0.16943556843599977, 0.6689837976121323, 0.5819980617906336, 0.11081777144278337, 0.08252403908338714, 0.0645473625299634, 0.31212512483621446, 0.32685118831804993, 0.835060326815393, 0.1551907008952659, 0.22562298402556413, 0.1366733226929351, 0.8466237511392755, 0.2925585291117241, 0.8801195181204912, 0.4541396644966763, 0.5437092031342309, 0.7560170822172259, 0.858725586024662, 0.6693100637576647, 0.04428428741775896, 0.7252827710090928, 0.6487863255777716, 0.8491733849229004, 0.7520851225806592, 0.9070497331504237, 0.7671915706313939, 0.17744639439390394, 0.9037610857680662, 0.7738895928320011, 0.5514435327901718, 0.5085515678923294, 0.9728281428055162, 0.48790611289251734, 0.8926246763670787, 0.29493117019873605, 0.9549274311013454, 0.9730240976232134, 0.3080386373836512, 0.3330953659216228, 0.699110591269102, 0.6783751019374447, 0.61761553709616, 0.16222970566922904, 0.6797850751249817, 0.48101498182318864, 0.16917943894781315, 0.9398024366131953, 0.3535530036749163, 0.399166630014062, 0.5233682690337501, 0.6914152852847948, 0.5544631584839599, 0.3473278137167213, 0.639377993267464, 0.6771309865381832, 0.600171553027478, 0.09191844020723362, 0.8777709033668971, 0.6136891282777126, 0.3001668938021745, 0.16066236069331125, 0.44634385098140955, 0.0813867077161227, 0.5955680313431114, 0.08060850565079597, 0.6994954176453377, 0.07595261207016857, 0.5480366309321103, 0.6885922180160133, 0.2006623651725586, 0.4494859857013675, 0.9530734497306246, 0.8040215598612613, 0.5112132850591693, 0.08045497295821602, 0.4403786080082283, 0.617145334780996, 0.6276941068679921, 0.2908691012737586, 0.6110558689302085, 0.5764179989390671, 0.26251270044331393, 0.169040060362689, 0.7782278547149054, 0.49622356436928766, 0.3410312983463396, 0.5988363990594632, 0.8041038727029921, 0.6410540371425001, 0.9806032324764897, 0.9610155476293443, 0.7927045587403418, 0.5142601965006058, 0.3543471188292484, 0.4290812704727637, 0.8732960084926661, 0.7987008356076402, 0.14439384700839375, 0.5811679617920957, 0.625124693750647, 0.7530132515152324, 0.005973991608310845, 0.16069310870658635, 0.5992677183927351, 0.8208118766514166, 0.7250302943932783, 0.0019470016662887822, 0.06832585842785371, 0.9408935751306519, 0.8980466260474085, 0.3624040167778762, 0.22928638725987482, 0.3344863255593481, 0.6234778721482982, 0.8913427353441967, 0.20916923554719444, 0.9307258314701337, 0.05954582762286968, 0.27435213868868985, 0.5070454925534953, 0.013877128593747365, 0.7632352533957474, 0.5954788145363233, 0.009678613261313624, 0.40534089415651314, 0.3200789895868173, 0.16313575613678005, 0.3113887704089031, 0.2301924078682643, 0.05376566532232459, 0.02244548123256056, 0.9017775619686206, 0.5218981242003192, 0.7887332572878809, 0.17543098395616838, 0.6476754194045379, 0.4899382453538913, 0.1377309679691297, 0.8413954377421138, 0.048085377010089775, 0.5533359090822304, 0.869837212349977, 0.4429468157895144, 0.22299727865890018, 0.2685516010641751, 0.5126149987223515, 0.3384264662273669, 0.6887330649735841, 0.6528490476479768, 0.014967134128002525, 0.50899090637839, 0.7539587140507303, 0.11407164208662904, 0.5048216221772267, 0.4382736991408761, 0.9216601239954294, 0.3347910970530575, 0.40803361925647436, 0.35441953955419914, 0.8032305106257182, 0.16299792508902222, 0.07183394663420284, 0.12833558157823813, 0.7213530639149479, 0.3329005982987541, 0.22778460933388486, 0.5982450871790287, 0.7485883353335836, 0.38798401138660743, 0.5655202870453071, 0.16905628681060017, 0.9184866895864489, 0.8942490531863384, 0.02956082146497501, 0.6856745777688921, 0.15564701652628612, 0.2145146842841958, 0.8971728119683426, 0.7121887661549767, 0.7804289825632611, 0.704809635615633, 0.48563929978032755, 0.06385276118547273}
  2. Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1) → currentRandomSeeds
  3. Corner(5) → layoutAppSize
  4. Remove(Sequence[k, k, 2, 100], primeList) → compositeList
  5. Element(compositeList, 1 + floor((currentRandomSeeds(2) * Length[compositeList]))) → numComposite
  6. Element(primeList, 1 + floor((currentRandomSeeds(2) * Length[primeList]))) → numPrime
  7. Element({1, numPrime, numPrime, numPrime, numComposite, numComposite, numComposite}, numberIndex) → number
  8. KeepIf(number / A ≟ round(number / A), A, Sequence[number]) → allFactorsList
  9. Element(allFactorsList, animate) → currentWidth
  10. makeBox(boxStart, currentWidth / scaleFactor, currentHeight / scaleFactor) → currentBox
  11. Text((("" * currentHeight) * ""), boxStart + (currentWidth / scaleFactor, ((-currentHeight)) / ((2 * scaleFactor))), true, true, 1, 0) → side1Label
  12. Text((("" * currentWidth) * ""), boxStart + (currentWidth / ((2 * scaleFactor)), 0), true, true, 0, 1) → side2Label
  13. If(numIsComposite, "composite", If[numIsPrime, "prime", "not prime or composite"]) → typeText
  14. If(numIsNeither, noSliderText, sliderText) → explanationText
  15. If(numIsComposite, textComposite, If[numIsPrime, textPrime, textNeither]) → textDefinition
  16. Sequence(Segment[boxStart - ((0, currentHeight / scaleFactor) * k), boxStart + (currentWidth / scaleFactor, 0) - ((0, currentHeight / scaleFactor) * k)], k, 0, 1) → widthSegs
  17. Sequence(Segment[boxStart + ((currentWidth / scaleFactor, 0) * k), boxStart - (0, currentHeight / scaleFactor) + ((currentWidth / scaleFactor, 0) * k)], k, 0, 1) → heightSegs
  18. If(Defined[allFactorsList], Length[allFactorsList], 3) → lengthAnimate

AI Drawing Prompt Reference

Create an area-model diagram showing number classification with a single rectangle. Randomly choose an integer as the target number, then determine the rectangle’s inner width using the list of its positive factors (width depends on the number of factors). Subdivide the rectangle into strip-like segments along both width and height to visualize the factor structure. Place text labels near the rectangle’s bottom and side edges to indicate the corresponding side lengths. Display a classification message next to the model: mark the number as “composite” if it has nontrivial factors, “prime” if it has exactly two positive factors, otherwise “not prime or composite”.
The prompt above was compiled from the original drawing commands and is for reference only.