33 lines
380 B
Text
33 lines
380 B
Text
$ jq -r -n -f stern_brocot.jq
|
|
First 15 integers of the Stern-Brocot sequence
|
|
as defined in the task description are:
|
|
1
|
|
1
|
|
2
|
|
1
|
|
3
|
|
2
|
|
3
|
|
1
|
|
4
|
|
3
|
|
5
|
|
2
|
|
5
|
|
3
|
|
4
|
|
|
|
Using an index origin of 1:
|
|
index of 1 is 1
|
|
index of 2 is 3
|
|
index of 3 is 5
|
|
index of 4 is 9
|
|
index of 5 is 11
|
|
index of 6 is 33
|
|
index of 7 is 19
|
|
index of 8 is 21
|
|
index of 9 is 35
|
|
index of 10 is 39
|
|
index of 100 is 1179
|
|
|
|
GCDs are all 1
|