OFFSET
1,1
COMMENTS
This square array A(row,col) is read by downwards antidiagonals as: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Ludic sieve starts with natural numbers larger than one: 2, 3, 4, 5, 6, 7, ... and in each subsequent stage one sets k = <the initial term of the preceding row> (which will be one of Ludic numbers) and removes both k and every k-th term after it, from column positions 1, 1+k, 1+2k, 1+3k, etc. of the preceding row to produce the next row of this array.
LINKS
EXAMPLE
The top left corner of the array:
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33
5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49
7, 11, 13, 17, 23, 25, 29, 31, 37, 41, 43, 47, 53, 55, 59, 61
11, 13, 17, 23, 25, 29, 37, 41, 43, 47, 53, 55, 61, 67, 71, 73
13, 17, 23, 25, 29, 37, 41, 43, 47, 53, 61, 67, 71, 73, 77, 83
17, 23, 25, 29, 37, 41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91
23, 25, 29, 37, 41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97
25, 29, 37, 41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107
29, 37, 41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115
37, 41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119
41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121
43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121, 127
47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121, 127, 131
53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121, 127, 131, 143
61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121, 127, 131, 143, 149
etc.
PROG
(Scheme)
(define (A260717bi row col) ((rowfun_n_for_A003309sieve row) col))
(define (add1 n) (1+ n))
;; Uses definec-macro which can memoize also function-closures:
(definec (rowfun_n_for_A003309sieve n) (if (= 1 n) add1 (let* ((prevrowfun (rowfun_n_for_A003309sieve (- n 1))) (everynth (prevrowfun 1))) (compose-funs prevrowfun (nonzero-pos 1 1 (lambda (i) (modulo (- i 1) everynth)))))))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jul 30 2015
STATUS
approved