Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,20 @@
; generate the sequence and check GCD
(for ((n 10000))
(unless (= (gcd (stern n) (stern (1+ n))) 1) (error "BAD GCD" n)))
→ #t
;; first items
(define sterns (cache 'stern))
(subvector sterns 1 16)
→ #( 1 1 2 1 3 2 3 1 4 3 5 2 5 3 4)
;; first occurences index
(for ((i (in-range 1 11))) (write (vector-index i sterns)))
→ 0 3 5 9 11 33 19 21 35 39
;; 100
(writeln (vector-index 100 sterns))
→ 1179
(stern 900000) → 446
(stern 900001) → 2479