Pareidolia: From Ancient Greek; παρα ‎(para, “concurrent, alongside”) + εἴδωλον ‎(eídōlon, “image”). The tendency to interpret a vague stimulus as something known to the observer, such as interpreting marks on Mars as canals, seeing shapes in clouds, or hearing hidden messages in music. Source: Wiktionary.

For example:

enter image description here

Paralogia: From Ancient Greek; παρα ‎(para, “concurrent, alongside”) + λόγος ‎(lógos, “speech, oration, word, ...”). The tendency to perceive words in arbitrary sequences of characters, such as in code golf programs. Source: yeah, I made that up (actually the word means something else, as pointed out by @Martin).

For example:



Write a program that takes a positive integer as input, produces an integer as output, and includes an English word as part of the code. The input-output relationship must correspond to an integer sequence that can be found in OEIS.


  • Only words from this list are allowed. This is admittedly arbitrary, but it's essential that we all agree on which words are accepted; and in that regard this list is probably as good as any other.
  • Words need to be formed by concatenating at least two function names or statements. If your language for example has a function called correlation it can't be used as is. The concatenation has to be strict: no other symbols should appear between the parts of the word. For example, bro~ken would not count as a word.
  • Case is unimportant: both valid and vaLiDare acceptable.
  • Words within strings do not count. The letters that make up the word need to be functions or statements in the language of choice, that is, something that is actually executed. For example, the following code would not be allowed: 'deoxyribonucleic'~1, where '...' is a string, ~ discards the previous content, and 1 just prints number 1.
  • Every letter of the word should be necessary. This means that removing a single letter from the word should change the input-output relation. That includes outputting a different sequence, or outputting any other thing(s), or producing no output, or causing an error.
  • Any positive integer should be acceptable as an input, and should produce an output, except for data-type or memory restrictions.
  • The outputs corresponding to inputs 1, 2, 3, ... should correspond to a sequence appearing in OEIS. No other output should be produced; only an integer number, possibly with trailing or leading whitespace.
  • Input and output can be function arguments or stdin/stdout.


The score is computed as total code length minus twice the length of the longest word, in characters. Or equivalently, number of not-in-longest-word characters minus length of longest word.

Lowest score wins.


Consider an imaginary postfix language that has these functions: c: input a number; At: compute square; $: add 1.

cAt would be a valid program (its output corresponds to the sequence 1, 4, 9, ..., which is A000290), and it would have score −3.

cAt$ would also be valid (sequence 2, 5, 10, ..., which is A002522), with score −2.

c$At would not be valid, because the only word here is "At" and is produced by a single function or statement.

  • \$\begingroup\$ I think this should be a popularity contest. \$\endgroup\$
    – MCMastery
    Commented Jan 31, 2016 at 1:39
  • 5
    \$\begingroup\$ @MCMastery This would not make a good popularity contest. (Most challenges wouldn't.) \$\endgroup\$
    – Alex A.
    Commented Jan 31, 2016 at 6:21
  • \$\begingroup\$ This is essentially limited to golfing languages though. \$\endgroup\$
    – ericw31415
    Commented May 8, 2016 at 22:05

10 Answers 10


CJam, -20


Outputs the nth element in the sequence A010861.

COUNTE                      e# push values of six preinitialized variables
      r                     e# read a token of input
       REVOLUTIONARIES      e# push values of 15 other preinitialized variables
                      ]     e# wrap whole stack in array
                       ,    e# get length

Removing a character from the word results in a completely different sequence A010860. There is a quite interesting relationship between the two sequences: at every index n, A010860(n) is coprime to A010861(n)! There must be some deep mathematical reason behind this.

Try it here.

  • 1
    \$\begingroup\$ I have discovered another curious mathematical relationship: if you subtract the A010860 sequence from the A010861 sequence, the result always equals 1 at every index! Fascinating... \$\endgroup\$
    – Doorknob
    Commented Jan 31, 2016 at 4:34
  • \$\begingroup\$ This one's going to be hard to beat :-) \$\endgroup\$
    – Luis Mendo
    Commented Jan 31, 2016 at 4:36
  • \$\begingroup\$ Oh, upper case.. Great idea :) \$\endgroup\$ Commented Jan 31, 2016 at 8:30

CJam, -5


A010051: prints 0 for composite numbers and 1 for primes.

It took me forever to find something that scored a few points and would break at the removal of any letter. Removing anything except m throws an error, and removing m turns the program into the identity function.

li  e# Read input and convert to integer.
mp  e# Check for primality.
et  e# Get current datetime as a list.
;   e# Discard the datetime again.

Try it online.

  • \$\begingroup\$ Beautiful choice of sequence! :-) \$\endgroup\$
    – Luis Mendo
    Commented Jan 31, 2016 at 0:07

05AB1E, -4 -11

Code, prints A010869 (constant 30):


Previous code:



D     # Duplicate top of the stack
 o    # Pop a, push 2**a
  G   # For N in range(1, 2**a):
   S  # Push all chars seperate from the top of the stack

Prints the A010879 sequence.

  • \$\begingroup\$ That's the most interesting sequence so far! \$\endgroup\$
    – Luis Mendo
    Commented Jan 30, 2016 at 18:57
  • 2
    \$\begingroup\$ Crossed out -4 is still regular -4 ;( \$\endgroup\$ Commented Feb 2, 2016 at 16:20

MATL, −6


Try it online!

Produces sequence 1, 2, 3, ... (A000027)

Removing any letter changes the output, or leaves the program expecting a second input which doesn't exist, or produces an error.


The program simply inhales a number and, after some fiddling around, exhales it unchanged.

I    % produces number 3
N    % number of elements in stack: produces number 1
h    % concatenates horizontally into array [3, 1]
a    % true if any element is nonzero. So it gives true (or equivalently 1)
l    % produces number 1
e    % triggers implicit input and reshapes into a 1x1 array. So it leaves input unchanged

Pyth, 1



       n00   - 0 != 0 (0) 
      a   0  - abs(^-0) (0, Required so it doesn't print out a random 0)
     t       - ^-1 (-1, required or will output 0 all the time)
    a      0 - abs(^-0) (1, Required so counts in right direction, would also print out a random 0)
   S         - 1-indexed range ([1], required so next command works properly)
  h          - Get the head (if `S` missed, will out 2)
*Q           - Multiply by Q

1, 2, 3, 4, 5...

Sequence A000027

Subliminal messages? Never.

Try it here.


Japt, -6


Outputs A004453: nimsum of N and 12 (N XOR 12). Test it online!

Note: the OEIS sequence is 0-indexed, so an input of 0 will result in the first item.

How it works

        // Implicit: N = array of inputs
Nu      // Push the following things to N:
LLIF    // 100, 100, 64, 15,
IED     // 64 again, 14, and 13.
)r^     // Reduce by XORing (using ^ between each pair)
        // The reduction goes as follows: U, U^100, U, U^64, U^79, U^15, U^1, U^12.
  • \$\begingroup\$ Nice! Any explanation, when you can? \$\endgroup\$
    – Luis Mendo
    Commented Jan 30, 2016 at 18:55
  • \$\begingroup\$ @LuisMendo Sure, done. It's incredibly simple, but I haven't found anything more complex yet. \$\endgroup\$ Commented Jan 30, 2016 at 18:56
  • \$\begingroup\$ @LuisMendo Updated. This one's a little more interesting. \$\endgroup\$ Commented Jan 30, 2016 at 19:42
  • \$\begingroup\$ Indeed! But apparently removing the Y produces the same output? (unless I'm doing something wrong) \$\endgroup\$
    – Luis Mendo
    Commented Jan 30, 2016 at 19:58
  • \$\begingroup\$ @Luis Is this better? \$\endgroup\$ Commented Jan 30, 2016 at 20:18

Headsecks, score −4


This maps to the Brainfuck program ,+-., which reads a single character and prints it, calculating A000030. Removing any character will obviously break it.

There's also marshal (,-<>+-.), which is effectively ,-., but that doesn't correspond to any OEIS sequence.


x86 machine code, score -4

Hexdump of the code:

53 51 55 41 53 68 69 65 73 74 51 58 83 c4 14 c3

Or, in code page 437:


Assembly code:

push ebx
push ecx
push ebp
inc ecx
push ebx
push 0x74736569
push ecx
pop eax
add esp, 0x14

A function that adds 1 to its argument.

Removing A turns it into an identity function. Removing any other byte messes up the stack, causing either a crash or bad behavior of the calling function.

I am pretty sure it's possible to improve the score, but it may depend on the interpretation of the requirements. For example, using the word SQUEAMIShness gives a program, that increases and then decreases the ebp register. Does removing any of these cause a crash? A simplest test program doesn't use the ebp register, so maybe it doesn't... To avoid this doubt, I used a shorter word.


Ruby, score 3

puts gets.partition''

This computes the identity sequence A000027. Output is surrounded by some whitespace; I hope that's okay.

  • \$\begingroup\$ Yes, whitespace is fine \$\endgroup\$
    – Luis Mendo
    Commented Feb 2, 2016 at 7:48

Math++, score -2


Implements A000004.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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