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.
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).
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
correlationit 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~kenwould not count as a word.
- Case is unimportant: both
- 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:
'...'is a string,
~discards the previous content, and
1just prints number
- 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
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
9, ..., which is A000290), and it would have score −3.
cAt$ would also be valid (sequence
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.