An alien civilization has a strange way of notating their numbers. Here are the first 30 numbers in their system:

enter image description here

The notation is unique up to slight differences in handwriting. Therefore you may ignore tiny details/mistakes such as the ink splotch on the right of the 14. Now tell me what this number is, and why:

enter image description here

  • 1
    Nice handwriting these aliens have – Duck Aug 15 at 19:00
  • 1
    @Duck Who said aliens can't have nice handwriting? ;-) – EKons Aug 15 at 19:00
  • 1
    @Duck To test the intelligence of Puzzling Stack Exchange... – EKons Aug 15 at 19:18
  • 2
    @Oray 15 is correct :) – Riley Aug 15 at 19:36
  • 1
    @ibrahimmahrir I do not see what you mean. 20 and 100 are written in unique ways. The symbol for 20 can only be interpreted as 20. – Riley Aug 15 at 19:50
up vote 9 down vote accepted

We can read each number as follows:

The number 0 is represented by nothing at all. A single dash represents the number 1.
If there's no connector at the top, it's a prime power:
The prime index is found at the tip of the arc - read the number recursively, then move this many primes forwards. In the examples above, we see that the number 29 is encoded as p_9 because it's the tenth prime, number 2 being p_0.
The power is found at the bottom of the arc - also to be read recursively. In the examples above, we see that 27 is encoded as 3^3.
Composite numbers are encoded as the product of their primes factors, starting with the smallest prime. In this case, the prime indexes for subsequent primes start at the next prime after the one to the left of it. We can see it in number 15, which is encoded as p_1 * q_0.

As for the number the second image, it's

p_{3^2 * 11} = p_99 = ...
require 'prime'; Prime.take(100).last
... = 541

  • Great answer, although I'm not sure this is true for all of them. If 15 is coded 3rd prime x 2nd prime (5 x 3), then why is 14 not coded 4th prime x 1st prime? – El-Guest Aug 15 at 19:46
  • Yes, all correct! Now I don't know whether to accept your answer or Doorknob's... It seems you were the first to get the correct final answer, and you posted a readable and precise description of the system first. – Riley Aug 15 at 19:47
  • 1
    @Riley I would say this one -- the explanation of how non-prime-powers are written is also a lot more elegant here (start numbering at the next prime after the one to the left). – Doorknob Aug 15 at 19:49
  • 2
    It's up to you, but my inclination would be that since John Dvorak got the answer right and first, both, accept his - but upvote Doorknob's, for being right. – Jeff Zeitlin Aug 15 at 19:49
  • 2
    @El-Guest 14 and 15 are both correctly encoded. Maybe you need to read the explanation more carefully? – Riley Aug 15 at 19:52

I'm going to guess that the answer is



Placing $A$ on top of $B$ gives $A^B$.

Placing $N$ below and to the right of the symbol for "2" gives $P(N+1)$, where $P(n)$ is the $n$th prime.

Placing $A$ and $B$ next to each other with a bar above gives the result of a somewhat complicated function. If $A$ is represented by $p_1^{n_1}p_2^{n_2}\ldots p_k^{n_k}$ and $B$ is $q^m$, where $p_1 < p_2 < \ldots < p_k < q$, then the result is $A \cdot P(P^{-1}(q) + P^{-1}(p_k))^m$. That is, $B$ is a prime power, and its base is increased by the index of the greatest prime divisor of $A$ before multiplying by $A$.

The last step in the answer in the image below is wrong -- it should be $P(99+1) = P(100)$.

And here are my notes:

  • Damn it, ninja'ed. (I'm not sure whether I've understood all your notes and therefore not sure whether I am interpreting top-joining exactly the same way as you, but we are definitely thinking along extremely similar lines.) – Gareth McCaughan Aug 15 at 19:30
  • Whoa, can you make that clearer to see – Duck Aug 15 at 19:30
  • 1
    Did you do this on the back of an exam sheet? :-) – EKons Aug 15 at 19:31
  • @GarethMcCaughan Basically, the one on the right is a prime power, and you increase that prime's index by the index of the greatest prime factor of the number on the left before multiplying them. I'll try to write up a clearer explanation in LaTeX. – Doorknob Aug 15 at 19:33
  • @ΈρικΚωνσταντόπουλος Back of an IOL problem, actually, which is weirdly fitting given that it tends to involve similar problems to this one :P – Doorknob Aug 15 at 19:34

Partial answer to begin with: it appears that

if a number can be written as $x^y$, then the character for $x$ is written on top of the character for $y$. See $8 = 2^3$, $9 = 3^2$, $16 = 4^2 = 2^4$, $25 = 5^2$, and $27 = 3^3$.

The sixty-third prime, which is 307 according to the first website I saw. Prime numbers greater than two are expressed as a "branch" from the middle of the curve signifying "2". )-

The line from the top of the curve means multiplication by the prime number in the series proceeding the prime it appears to be. ) 9*7 means 63rd in the series of primes.

  • 1
    Sorry, this is close, but John Dvorak has the correct answer. – Riley Aug 16 at 0:43
  • Hello! Welcome to the Puzzling Stack Exchange (Puzzling.SE), and congratulations to your very first answer on this site! Since you are new, I strongly suggest you visit the Help Center, particularly these three sections: Asking (e.g. this), Answering (e.g. this) and Our model (particularly the Code of Conduct). You will most likely figure out what the other sections discuss as you gain experience on this site. Hope you enjoy :D – user477343 Aug 16 at 0:56

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.