Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,16 @@
#lang racket
(require racket/stream)
(define (van-eck)
(define (next val n seen)
(define val1 (- n (hash-ref seen val n)))
(stream-cons val (next val1 (+ n 1) (hash-set seen val n))))
(next 0 0 (hash)))
(define (get m n s)
(stream->list
(stream-take (stream-tail s m)
(- n m))))
"First 10 terms:" (get 0 10 (van-eck))
"Terms 991 to 1000 terms:" (get 990 1000 (van-eck)) ; counting from 0