Junior Arithmancer

**Junior Arithmancer** is a Glulx interactive fiction game written with Inform 7 and is © 2018 by Mike Spivey. It was an entry in IF Comp 2018 where it took 7th place overall and 2nd place for Miss Congeniality. At the 2018 XYZZY Awards, it won the Best Puzzles award and was a finalist in the Best Implementation category. This game also placed 46th on the 2019 edition of the Interactive Fiction Top 50 of All Time poll.

In this game, you play as the Academy's first candidate in Arithmancy. The examining committee quickly gives you your exam materials before translating you into the examination room. There, you will use the provided spells to reproduce the numbers on your number sheet to earn points; completing tasks on your task page will also earn you points. Happy spellcasting and good luck!

This solution is by David Welbourn, and is based on Release 2 of the game.

**SPOILERS AHEAD.** Reading a walkthrough prematurely can sometimes diminish one's enjoyment of an interactive fiction game. Please make an honest effort to play the game before reading this walkthrough.

- Map
- Walkthrough
- Extras
- Thank You to my Patreon supporters
- Support me on Ko-Fi
- External links:

- You can visit many integers in the realm of Integers, including negative numbers. Each integer has a color associated with it.
- While you
*can*briefly visit irrational or imaginary numbers, you are instantly returned to your departure point.

Morkan, Terabox, and Berzia are waiting for you in the lecture hall. You are their first candidate in Arithmancy. Morkan gives you a number sheet, task page, and spell list before he translates you to the examination room.

This game uses left and right panels. The right panel can be toggled with the WINDOW ON/OFF command.

Examination Room

You hear a magical observation system turned on.

`> help.`

`> x sign.`

`> commands.`

`> i. numbers. tasks. spells. math. x slot.`

`> know sta.`

`> sta 1.`

Oneinky blackness

`> x token. ret.`

Examination Room

The instructors think you can't hear them.

`> put token in slot.`

`> know inc.`

`> sta 1.`

Oneinky blackness

`> inc.`

Twosoft, warm red

`> ret.`

Examination Room

`> put token in slot.`

`> know plu.`

`> sta 2.`

Twosoft, warm red

`> plu 0. inc.`

Threevibrant green

`> ret.`

Examination Room

`> put token in slot.`

`> know min.`

Attempt "2.236":

`> sta 2. min 0. inc. plu 3.`

Sixbright yellow

`> ret.`

Examination Room

`> put token in slot.`

`> know tim.`

Attempt "2.2360":

`> sta 2. min 0. inc. plu 3. tim 0.`

`> ret.`

`> put token in slot.`

`> know cat.`

Complete "1.41421":

`> sta 1. tim 4. cat min 0. plu 7.`

`> ret.`

`> put token in slot.`

`> know div.`

Complete "1.20205":

`> sta 1. inc. min 2. cat plu 0. div 4.`

`> ret.`

`> put token in slot.`

`> know mot.`

Complete 2.71828:

`> sta 2. plu 5. cat min 9. mot div 4. tim 4.`

`> ret.`

`> put token in slot.`

`> know inv.`

Complete 3.14159:

`> sta 3. min 2. tim 4. cat inc. mot plu 4.`

`> ret.`

`> put token in slot.`

`> know fib.`

Complete 0.57721:

`> sta 0. plu 5. inv min 2. div 1. mul 3.`

`> ret.`

`> put token in slot.`

`> know squ.`

Complete 2.23606:

`> sta 2. plu 0. inc. tim 2. min 6. fib.`

Sixbright yellow

With six numbers completed, you now have Berzia's vote.

`> ret.`

Examination room

Merlena casts a gag spell on Teraboz for using a forbidden word.

`> z.`

Teraboz manages to cast a counterspell and can talk again.

`> z.`

Berzia doesn't understand how Teraboz broke a Council-backed silencing spell.

`> put token in slot.`

`> know ate.`

Since you have earned majority support of the examiners, you'll no longer be helped with spell effects. Remember that according to the sign, using a spell or prefix successfully when constructing a target number counts as proof that you know what the spell effect is.

Complete 3.14159 with just 4 spells via 3, 14, 15, and 9:

`> sta 3. ate plu 1.`

`> inc. min 6. ret.`

Complete 1.20205 in only 4 spells via 1, 20, 20, and 5:

`> sta 1. ate plu 9. min 0. div 4. ret.`

Complete 2.71828 in only 4 spells via 2, 7, 18, and 28:

`> sta 2. plu 5. ate inc. ate min 0.`

`> ret.`

Complete 0.69314:

`> sta 0. plu 6. inv min 3. div 3. ate inc.`

`> ret. put token in slot.`

If you experiment, you'll learn that TAC appends the previous number after the current number before applying opration. The reverse of CAT, if you will. By the way, that was the last spell token.

Complete 1.64493:

`> sta 1. tim 6. min 2. tac plu 3.`

`> mot div 3.`

`> ret.`

Complete 1.73205:

`> sta 1. plu 6. min 4. ate fib. div 4.`

`> ret.`

Complete 1.61803:

`> sta 1. inv div 6. mul 3. mot min 8. plu 3.`

`> ret.`

For a perfect score, you'll need to complete all the tasks on your task page. You should have two of them already. But if you don't yet officially know what SQU means yet, because you skipped using `know squ` before earning Berzia's support, here's one way to do that by constructing 0.693:

`> sta 0. plu 6. inv min 3. inv squ. ret.`

Visit a dazzling white space (Minus One), then an imaginary-numbered space (the square root of Minus One):

`> sta 0. min 1.`

`> inv squ.`

`> ret.`

Complete 1.20205 using just 3 spells, via 1, 20, and 205:

`> sta 1. tac tim 2. tac plu 4.`

`> ret.`

Complete 2.23606 using five spells:

`> sta 2. tac plu 3. mot tim 2. inv div 0. inv min 6.`

`> ret.`

Visit a space whose number is greater than 2 billion:

`> sta 9. ate plu 9.`

`> cat min 0.`

`> tac tim 9.`

`> cat squ.`

`> ret.`

Visit second and third spaces with dazzling white light, 30 and 900. A number space has dazzling white light if its number is equal to 2^{n}×3^{n}×5^{n} for some positive integer value of n.

`> sta 6. tim 5.`

`> squ.`

`> ret.`

Visit a space with pale azure light, 2250. To figure out that this is the number you want, you need to create a working theory how colors are determined by the factors in a number, particularly factors of 2, 3, and 5. Pale azure results when the number equals 5^{a}×3^{b}×2^{c} for positive integer values of a, b, and c where a > b > c, and 2250 = 5^{3} × 3^{2} × 2.

`> sta 4. ate inc. squ. tim 5. inv div 2.`

`> ret.`

Visit a space with gray light with a hint of violet, such as 350.

`> sta 5. tac min 0. tim 7.`

`> ret.`

Do the color tour task:

`> sta 3.`

`> tim 2.`

`> inv min 6.`

`> div 3.`

`> inc.`

`> cat plu 5.`

`> ret.`

You've done it all. Now end this exam:

`> tasks. end.`

Lecture Hall

The committee votes to accept you, but then Merlena barges in and votes for you as well. Merlena then tries to fire Teraboz, but instead Teraboz turns Merlena into a frog, then quits!

`*** Welcome to the Academy ***`

`> credits`

**Morkan**,**Teraboz**, and**Berzia**are your examiners. Terabox is somewhat grumpy, Berzia is thoughtful, and Morkan is somewhat bland.seems to be on a power trip and unwisely wields her position like a club.*Associate*Vice Dean Merlena- Your
**grandmother**will appear briefly if you cast`OMA`.

Mentioned:

**Professor Mivey**reportedly often miscast the`SLU`spell in his class.**The Oversight Council**seems to have made several questionable decisions in recent years.- A notable former
**student**made their fortune using Tyromancy and WizStrip. This is a reference to the protagonist of Risorgimento Represso. **Yottaboz**'s name is invoked in the intro. Maybe Yottaboz is a diety?

These are the colors associated with the number spaces visited in this walkthrough, plus a few extra:

- −1: dazzling white.
- 0: no particular color.
- 1: inky blackness.
- 2: soft, warm red.
- 3: vibrant green.
- 4: deep red.
- 5: royal blue.
- 6: bright yellow.
- 7: dingy grayish.
- 8: intense red.
- 9: deep green.
- 10: bright magenta.
- 11: dingy grayish.
- 12: bright orange.
- 13: dingy grayish.
- 14: dingy grayish with a hint of red.
- 15: bright cyan.
- 16: very intense red.
- 17: dingy grayish.
- 18: bright chartreuse.
- 19: dingy grayish.
- 20: bright rose.
- 21: dingy grayish with a hint of green.
- 23: dingy grayish.
- 24: bright orange.
- 28: dingy grayish with a hint of red.
- 30: dazzling white.
- 36: deep yellow.
- 49: dingy grayish.
- 50: bright violet.
- 64: very intense red.
- 205: dingy grayish with a hint of blue.
- 216: intense yellow.
- 225: deep cyan.
- 350: dingy grayish with a hint of violet.
- 900: dazzling white.
- 928: dingy grayish with a hint of red.
- 1125: bright azure.
- 2250: pale azure.
- 835,452: dingy grayish with a hint of yellow.
- 2,054,226,960: dingy grayish with a hint of orange.

Zero is special. It is the only integer without any particular color.

Primary colors exclusively use one factor of 2, 3, or 5:

- Red = 2
^{n}, for example: 2, 4, 8, 16, 32, 64, ... - Green = 3
^{n}, for example: 3, 9, 27, 81, ... - Blue = 5
^{n}, for example: 5, 25, 125, 625, ...

These secondary and trinary colors use two factors of 2, 3, and 5:

- Yellow = 2
^{n}× 3^{n}= 6^{n}, for example: 6, 36, 216, ... - Magenta = 2
^{n}× 5^{n}= 10^{n}, for example: 10, 100, 1000, ... - Cyan = 3
^{n}× 5^{n}= 15^{n}, for example: 15, 225, 3375, ... - Orange = 2
^{a}× 3^{b}, where*a*>*b*, for example: 12, 48, 72, ... - Rose = 2
^{a}× 5^{b}, where*a*>*b*, for example: 20, 40, 200, ... - Chartreuse = 3
^{a}× 2^{b}, where*a*>*b*, for example: 18, 54, ... - Aquamarine = 3
^{a}× 5^{b}, where*a*>*b*, for example: 45, 135, ... - Violet = 5
^{a}× 2^{b}, where*a*>*b*, for example: 50, 250, ... - Azure = 5
^{a}× 3^{b}, where*a*>*b*, for example: 75, 375, ...

White and pale colors use three factors of 2, 3, and 5:

- White = 2
^{n}× 3^{n}× 5^{n}= 30^{n}, for example: 30, 900, ... - Pale yellow = 2
^{a}× 3^{a}× 5^{b}, where*a*>*b*, for example: 180. - Pale red = 2
^{a}× 3^{b}× 5^{b}, where*a*>*b*, for example: 60. - Pale orange = 2
^{a}× 3^{b}× 5^{c}, where*a*>*b*>*c*, for example: 360. - Pale magenta = 2
^{a}× 5^{a}× 3^{b}, where*a*>*b*, for example: 300. - Pale rose = 2
^{a}× 5^{b}× 3^{c}, where*a*>*b*>*c*, for example: 600. - Pale green = 3
^{a}× 2^{b}× 5^{b}, where*a*>*b*, for example: 90. - Pale chartreuse = 3
^{a}× 2^{b}× 5^{c}, where*a*>*b*>*c*, for example: 540. - Pale cyan = 3
^{a}× 5^{a}× 2^{b}, where*a*>*b*, for example: 450. - Pale aquamarine = 3
^{a}× 5^{b}× 2^{c}, where*a*>*b*>*c*, for example: 1350. - Pale blue = 5
^{a}× 2^{b}× 3^{b}, where*a*>*b*, for example: 150. - Pale violet = 5
^{a}× 2^{b}× 3^{c}, where*a*>*b*>*c*, for example: 1500. - Pale azure = 5
^{a}× 3^{b}× 2^{c}, where*a*>*b*>*c*, for example: 2270.

Gray is a result of having prime factors that are not 2, 3, or 5.

- Plain "dingy grayish" results when there are no 2, 3, or 5 factors, for example: 7, 11, 13, 17, 19, etc.
- "dingy grayish with a hint of X" results when there's at least one factor that is 2, 3, or 5 and at least one factor that is none of those.
- "pale grayish" is reported instead of "dingy gray with a hint of white", for example: 210.

All of the above only applies to positive numbers. In brief, negative numbers get the opposite colors from their positive counterparts, for example::

- Minus One (dazzling white) is the opposite of One (inky blackness).
- Minus Two (bright cyan) is the opposite of Two (soft, warm red).
- Minus Three (bright magenta) is the opposite of Three (vibrant green).
- Minus Four (deep cyan) is the opposite of Four (deep red).
- Minus Five (bright yellow) is the opposite of Five (royal blue).
- Minus Six (royal blue) is the opposite of Six (bright yellow).
- Minus Seven (dingy grayish) is the opposite of Seven (dingy grayish).
- Minus Eight (intense cyan) is the opposite of Eight (intense red).
- Minus Nine (deep magenta) is the opposite of Nine (deep green).
- Minus Ten (vibrant green) is the opposite of Ten (bright magenta).
- Minus Eleven (dingy grayish) is the opposite of Eleven (dingy grayish).
- Minus Twelve (bright azure) is the opposite of Twelve (bright orange).
*etc.*

To put that another way:

- White is the opposite of black.
- Gray is the opposite of gray.
- Red is the opposite of cyan.
- Blue is the opposite of yellow.
- Green is the opposite of magenta.
- Orange is the opposite of azure.
- Violet is the opposite of chartreuse.
- Rose is the opposite of aquamarine.

This is the response to `CREDITS` at game's end:

Junior Arithmancer is copyright 2018 by Michael Z. Spivey. It may be distributed for free, but not sold or included in any for-profit collection without written permission from the author.

Cover Art: Cody J. Lail Design | www.codyjlail.com

Testing: Arthur DiBianca, Brian Rushton, Andrew Schultz, Walt Semrau, Daniel Spivey

Bug Reports on Release 1: Mike Carletta, Arthur DiBianca, Martin Höfler, John Spivey

Inform 7: Graham Nelson

Extensions to Inform 7: Jon Ingold, Emily Short, Dannii WillisJunior Arithmancer is dedicated to the memory of David Foreman: teacher, mentor, friend.

Inspirations: The germ of the idea for Junior Arithmancer came from three sources: (1) My own game, A Beauty Cold and Austere, where I always felt there was more that could be done with the number locations, (2) Arthur DiBianca's The Wand, with its simple spellcasting mechanic that actually allows for a huge number of possible spells, and (3) David Fisher's Suveh Nux, in which different spell components combine to create different effects.If you've enjoyed this game, please let me know at

~~email redacted~~. Junior Arithmancer is free to play, so my main reward for writing it is feedback from players. Bug reports are also greatly appreciated.

During the game, the response to `CREDITS` is the same as above but without the Inspirations paragraph.

The game always ends when you cast the `END` spell. Merlena always shows up to cast her vote and always in your favor, regardless of your perfomance.

- If you haven't completed a single number on the sheet, the votes are 3-to-1 against you. Morkan suggests trying the exam again next year or one of the other entrance exams.
- If you have completed at least one number on the sheet, Morkan now supports you. But a 2-to-2 tie is not good enough to pass since you need a majority of the votes. Teraboz enjoys telling Merlena that her vote was irrelevant.
- If you have completed at least six of the numbers on the sheet, Berzia now supports you. The votes are 3-to-1 for you, and Morkan welcomes you to the Academy.
- Actually, Morkan only manages to welcome you to the Academy if you cast
`END`directly from the Integer space after completing the sixth number. If, instead, you return to the examination hall first, Merlena gags Teraboz, then Teraboz breaks the gag. Now when you cast`END`, Merlena will attempt to fire Teraboz, but Teraboz turns Merlena into a frog first! Then Teraboz quits, but before she leaves, she welcomes you to the Academy. - If you complete all the numbers on the sheet and have a score of at least 80, Teraboz now supports you. The votes are unanimous. Teraboz turns Merlena into a frog, quits, and welcomes you to the Academy.
- If you have a perfect score, Morkan awards you with a large golden trophy before Teraboz turns Merlena into a frog, quits, and welcomes you to the Academy.

- a
**number sheet**. You're carrying it. - Read it. It lists the target numbers that you need to spell out by visiting the digits, in order, in the Integer space. Ignore the decimal points in the numbers; only the digits are significant.
- This document is magical. As you spell out a target number, completed digits are displayed in boldface in the second column of numbers, replacing the x's. Whenever you return to the examination room, the boldface is removed, but the digits remain to show your progress.
- a
**task page**. You're carrying it. - Read it. It lists several optional tasks you can try for additional points. Completing these tasks do not earn you any spell tokens.
- a
**spell list**. You're carrying it. - Read it. It lists all the spells you can use. Initially, there are only three spells listed:
`RET`,`END`, and`STA #`. - This document is magical. Up to seven additional spells and five spell prefixes can be added to your spell list by inserting spell tokens into the slot in the examination room. These new spells and prefixes only work in the Integer space.
- While in the Integer space, you can only use each spell once; however, spell prefixes can be reused. When you return to the examination room, your spells are all reset so you can use them on your next visit to the Integer space.
- a
**first spell token**. Acquire it by earning a first 5 points; see Score. - In the examination room, put the first token into the slot to get the
`INC`spell added to your spell list. - a
**second spell token**. Acquire it by earning a second 5 points. - In the examination room, put the second token into the slot to get the
`PLU #`spell added to your spell list. - a
**third spell token**. Acquire it by earning a third 5 points. - In the examination room, put the third token into the slot to get the
`MIN #`spell added to your spell list. - a
**fourth spell token**. Acquire it by earning a fourth 5 points. - In the examination room, put the fourth token into the slot to get the
`TIM #`spell added to your spell list. - a
**fifth spell token**. Acquire it by earning a fifth 5 points. - In the examination room, put the fifth token into the slot to get the
`CAT`spell prefix added to your spell list. - a
**sixth spell token**. Acquire it by earning a sixth 5 points. - In the examination room, put the sixth token into the slot to get the
`DIV #`spell added to your spell list. - a
**seventh spell token**. Acquire it by earning a seventh 5 points. - In the examination room, put the seventh token into the slot to get the
`MOT`spell prefix added to your spell list. - an
**eighth spell token**. Acquire it by earning a eighth 5 points. - In the examination room, put the eighth token into the slot to get the
`INV`spell prefix added to your spell list. - a
**ninth spell token**. Acquire it by earning a ninth 5 points. - In the examination room, put the ninth token into the slot to get the
`FIB`spell added to your spell list. - a
**tenth spell token**. Acquire it by earning a tenth 5 points. - In the examination room, put the tenth token into the slot to get the
`SQU`spell added to your spell list. - an
**eleventh spell token**. Acquire it by earning a eleventh 5 points. - In the examination room, put the eleventh token into the slot to get the
`ATE`spell prefix added to your spell list. - a
**twelfth spell token**. Acquire it by earning a twelfth 5 points. - In the examination room, put the twelfth token into the slot to get the
`TAC`spell prefix added to your spell list.

The response to `SCORE` is:

You have earned

your-scoreout of a possible 100 points on your entrance exam in Arithmancy.

Points are awarded as follows:

- 5 points for reaching the first digit in a number sequence.
- 5 points for reaching the second digit in a number sequence.
- 5 points for reaching the third digit in a number sequence.
- 5 points for reaching the fourth digit in a number sequence.
- 5 points for reaching the fifth digit in a number sequence.
- 5 points for completing a number sequence.
- 5 points for completing a second number sequence.
- 5 points for completing a third number sequence.
- 5 points for completing a fourth number sequence.
- 5 points for completing a fifth number sequence.
- 5 points for completing a sixth number sequence.
- 5 points for completing a seventh number sequence.
- 5 points for completing an eighth number sequence.
- 5 points for completing a ninth number sequence.
- 5 points for completing a tenth and last number sequence.
- 1 point for visiting an imaginary-numbered space.
- 1 point for learning the meaning of all spells and prefixes.
- 2 points for completing a number using only three spells.
- 3 points for completing four numbers using no more than four spells for each.
- 4 points for completing all ten numbers using no more than five spells for each.
- 2 points for visiting a space whose number is larger than 2 billion.
- 1 point for visiting a space with dazzling white light.
- 1 point for visiting a second space with dazzling white light.
- 2 points for visiting a third space with dazzling white light.
- 2 points for visiting a space with pale azure light.
- 2 points for visiting a space whose light is gray with a hint of violet.
- 4 points for visiting, in a single sequence and in any order but without repetition, six consecutive spaces whose colors are red, orange, yellow, green, blue, and violet.

**END**: End the examination, submitting your work for grading.- This is one of your initial spells.
- This spell also ends the game.
**RET**: Return to examination room.- This is one of your initial spells.
- All your spells are restored when you return to the examination room.

When a spell requires a number, that number must be a single-digit number from 0 to 9. You can only use each arithmancy spell once while in the Integer space. Arithmancy spells are restored when you return to the examination room.

**STA #**: Begin a sequence of digits.- This is one of your initial spells. STA is short for START.
- Use this spell only in the examination room.
- Spell prefixes cannot be used with this spell.
**INC**: Add one to current number.- Acquire this spell by inserting the first spell token into the examination room's slot. INC is short for INCREMENT.
**PLU #**: Add a single digit to current number.- Acquire this spell by inserting the second spell token into the examination room's slot. PLU is short for PLUS.
**MIN #**: Subtract a single digit from current number.- Acquire this spell by inserting the third spell token into the examination room's slot. MIN is short for MINUS.
**TIM #**: Multiply current number by a single digit.- Acquire this spell by inserting the fourth spell token into the examination room's slot. TIM is short for TIMES.
- Amusingly, MUL (short for MULTIPLY) is also understood as the TIM spell.
**DIV #**: Divide current number by a single digit.- Acquire this spell by inserting the sixth spell token into the examination room's slot. DIV is short for DIVIDE.
- If division would result in a non-integer, the spell fails.
- If you try to divide by zero, your spell list burns up, and Morkan gives you a fireproof replacement list.
**FIB**: Add previous number to current number.- Acquire this spell by inserting the ninth spell token into the examination room's slot. FIB is short for FIBONACCI.
- If there is no previous number, it is assumed to be zero.
- Since FIB already uses the previous number visited, you cannot modify FIB with either the CAT or TAC prefixes since they also use the previous number visited.
**SQU**: Square current number.- Acquire this spell by inserting the tenth spell token into the examination room's slot. SQU is short for SQUARE.

Note that while you can reuse spell prefixes, you cannot use more than one prefix per spell.

**CAT**: Concatenate previous number to front of current number before applying operation.- Acquire this prefix by inserting the fifth spell token into the examination room's slot. CAT is short for 'CATENATE.
- If there is no previous number, it is assumed to be zero.
- If the previous number is negative and the current number is positive, they concatenate into a large negative number. For example, −6 concats with 36 to make −636.
- CAT fails when the current number is negative.
**MOT**: Truncate current number to its ones digit before applying operation.- Acquire this prefix by inserting the seventh spell token into the examination room's slot. MOT is short for
__MO__DULO__T__EN. **INV**: Invert operation.- Acquire this prefix by inserting the eighth spell token into the examination room's slot. INV is short for INVERT.
- PLU and MIN are inverses of each other.
- TIM and DIV are inverses of each other.
- The inverse of INC is to subtract one from the current number.
- The inverse of SQU is to generate a square root, but only if that root is an integer.
- The inverse of FIB is to subtract the previous number from the current number. If there is no previous number, it is assumed to be zero.
**ATE**: Add ten to current number before applying operation.- Acquire this prefix by inserting the eleventh spell token into the examination room's slot. ATE is short for
__A__DD__TE__N. **TAC**: Concatenate current number to front of previous number before applying operation.- Acquire this prefix by inserting the twelfth spell token into the examination room's slot. TAC is CAT backwards.
- If there is no previous number, it is assumed to be zero.
- TAC fails when the previous number is negative.

A couple other spells are mentioned by the examiners soon after you complete your first number. Prefixes are ignored with these spells.

: Some sort of sleep spell?**SLU**- If you try to cast SLU, you just hear Teraboz yawn.
: Summon your grandmother?**OMA**- If you try to cast OMA, your grandmother briefly appears, but Morkan sends her away before she can say or do anything but look irritated. Future attempts to use OMA fail.

This walkthrough is provided free of charge since the work it's based on has less than fifteen locations. Please consider it a thank you for your support!

I create larger walkthroughs too! Please visit my Patreon account if you're interested in helping me create more interactive fiction walkthroughs. I appreciate all the help I can get! Thanks again.

Ko-Fi is a way to send me small one-time donations. Every little bit helps, and thank you!