Skip to content

Commit 1ef979e

Browse files
committed
Add "Recamán" hole
Closes #348
1 parent 180281a commit 1ef979e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

db/a-schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CREATE TYPE hole AS ENUM (
99
'levenshtein-distance', 'leyland-numbers', 'look-and-say',
1010
'lucky-tickets', 'morse-decoder', 'morse-encoder', 'niven-numbers',
1111
'odious-numbers', 'ordinal-numbers', 'pangram-grep', 'pascals-triangle',
12-
'pernicious-numbers', 'poker', 'prime-numbers', 'quine',
12+
'pernicious-numbers', 'poker', 'prime-numbers', 'quine', 'recamán',
1313
'rock-paper-scissors-spock-lizard', 'roman-to-arabic', 'rule-110',
1414
'seven-segment', 'sierpiński-triangle', 'spelling-numbers', 'sudoku',
1515
'ten-pin-bowling', 'tongue-twisters', 'united-states', 'vampire-numbers',

holes.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,17 +1344,19 @@ preamble = '''
13441344

13451345
['Recamán']
13461346
category = 'Sequence'
1347-
experiment = 348
13481347
links = [
1349-
{ name = 'Numberphile', url = '//numberphile.com/videos/slightly-spooky-recaman-sequence' },
1350-
{ name = 'Wikipedia', url = '//en.wikipedia.org/wiki/Recamán%27s_sequence' },
1348+
{ name = 'Numberphile', url = '//numberphile.com/videos/slightly-spooky-recaman-sequence' },
13511349
{ name = 'OEIS A005132', url = '//oeis.org/A005132'},
1350+
{ name = 'Rosetta Code', url = "//rosettacode.org/wiki/Recaman's_sequence" },
1351+
{ name = 'Wikipedia', url = "//www.wikipedia.org/wiki/Recamán's_sequence" },
13521352
]
13531353
preamble = '''
13541354
<p>
1355-
Starting from zero, each term of the sequence is <b>a(n) = a(n-1) - n</b> but only if <b>a(n) > 0</b>
1356-
and it has not previously generated. In case the condition doesn't hold, <b>a(n) = a(n-1) + n</b>.
1357-
Print the first 250 terms of the sequence one per line.
1355+
Starting from zero, each term of the sequence is <b>a(n) = a(n-1) - n</b>
1356+
but only if <b>a(n) > 0</b> and it has not previously generated. In case
1357+
the condition doesn't hold, <b>a(n) = a(n-1) + n</b>.
1358+
1359+
<p>Print the first <b>250</b> terms of the sequence one per line.
13581360
'''
13591361

13601362

0 commit comments

Comments
 (0)