Skip to content

Commit 1c7c5fa

Browse files
committed
Make "Jacobi Symbol" live
1 parent ddb077a commit 1c7c5fa

2 files changed

Lines changed: 22 additions & 18 deletions

File tree

‎config/holes.toml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,18 +834,21 @@ preamble = '''
834834

835835
['Jacobi Symbol']
836836
category = 'Mathematics'
837-
experiment = -1
838837
links = [
839838
{ name = 'Rosetta Code', url = '//rosettacode.org/wiki/Jacobi_symbol' },
840839
{ name = 'Wikipedia', url = '//en.wikipedia.org/wiki/Jacobi_symbol' },
841840
]
842841
preamble = '''
842+
<p>For each input pair (a,n) print the Jacobi symbol (a/n).
843+
843844
<p>
844-
For each input pair (a,n) print the Jacobi symbol (a/n).
845-
<p>
846-
For odd prime n, (a/n) defined as 0 for a=0 mod n, as 1 if a is a square mod n and -1 otherwise.<br>
847-
For odd n=m*p, (a/n) is defined as (a/m)*(a/p).<br>
848-
Note that calculating the symbol from the definition is not very efficient as it requires factorisation of n.
845+
For odd prime n, (a/n) defined as 0 for a=0 mod n, as 1 if a is a square
846+
mod n and -1 otherwise.
847+
<br>
848+
For odd n=m*p, (a/n) is defined as (a/m)*(a/p).
849+
<br>
850+
Note that calculating the symbol from the definition is not very efficient
851+
as it requires factorisation of n.
849852
'''
850853

851854
['Kolakoski Constant']

‎db/a-schema.sql‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ CREATE TYPE hole AS ENUM (
2626
'css-colors', 'cubes', 'diamonds', 'divisors', 'emirp-numbers', 'emojify',
2727
'evil-numbers', 'fibonacci', 'fizz-buzz', 'foo-fizz-buzz-bar',
2828
'fractions', 'happy-numbers', 'happy-numbers-long', 'hexdump',
29-
'intersection', 'isbn', 'kolakoski-constant', 'kolakoski-sequence',
30-
'leap-years', 'levenshtein-distance', 'leyland-numbers', 'look-and-say',
31-
'lucky-numbers', 'lucky-tickets', 'morse-decoder', 'morse-encoder',
32-
'musical-chords', 'niven-numbers', 'number-spiral', 'odious-numbers',
33-
'ordinal-numbers', 'pangram-grep', 'pascals-triangle',
34-
'pernicious-numbers', 'poker', 'prime-numbers', 'prime-numbers-long',
35-
'qr-decoder', 'quine', 'recamán', 'reverse-polish-notation',
36-
'rock-paper-scissors-spock-lizard', 'roman-to-arabic', 'rule-110',
37-
'seven-segment', 'sierpiński-triangle', 'smith-numbers',
38-
'spelling-numbers', 'star-wars-opening-crawl', 'sudoku', 'sudoku-v2',
39-
'ten-pin-bowling', 'time-distance', 'tongue-twisters', 'united-states',
40-
'vampire-numbers', 'van-eck-sequence', 'λ', 'π', 'τ', 'φ', '√2', '𝑒'
29+
'intersection', 'isbn', 'jacobi-symbol', 'kolakoski-constant',
30+
'kolakoski-sequence', 'leap-years', 'levenshtein-distance',
31+
'leyland-numbers', 'look-and-say', 'lucky-numbers', 'lucky-tickets',
32+
'morse-decoder', 'morse-encoder', 'musical-chords', 'niven-numbers',
33+
'number-spiral', 'odious-numbers', 'ordinal-numbers', 'pangram-grep',
34+
'pascals-triangle', 'pernicious-numbers', 'poker', 'prime-numbers',
35+
'prime-numbers-long', 'qr-decoder', 'quine', 'recamán',
36+
'reverse-polish-notation', 'rock-paper-scissors-spock-lizard',
37+
'roman-to-arabic', 'rule-110', 'seven-segment', 'sierpiński-triangle',
38+
'smith-numbers', 'spelling-numbers', 'star-wars-opening-crawl', 'sudoku',
39+
'sudoku-v2', 'ten-pin-bowling', 'time-distance', 'tongue-twisters',
40+
'united-states', 'vampire-numbers', 'van-eck-sequence', 'λ', 'π', 'τ',
41+
'φ', '√2', '𝑒'
4142
);
4243

4344
CREATE TYPE keymap AS ENUM ('default', 'vim');

0 commit comments

Comments
 (0)