A275730 Square array A(n,d): overwrite with zero the digit at position d from right (indicating radix d+2) in the factorial base representation of n, then convert back to decimal, read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc.
0, 0, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 4, 0, 1, 2, 3, 0, 4, 0, 1, 2, 3, 4, 1, 6, 0, 1, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 1, 6, 8, 0, 1, 2, 3, 4, 5, 6, 7, 2, 7, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 3, 6, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 7, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 12, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 13, 14
Offset: 0
Examples
Columns 0-4 of rows 0 - 24 of the array: 0, 0, 0, 0, 0, ... [No matter which digit of zero we clear, it stays zero forever] 0, 1, 1, 1, 1 ... [When clearing the least significant digit (pos. 0) of one, "1", we get zero, and clearing any other digit past the most significant digit keeps one as one] 2, 0, 2, 2, 2, ... [Clearing the least significant digit of 2, "10", doesn't affect it, but clearing the digit-1 zeros the whole number]. 2, 1, 3, 3, 3, ... [Clearing the least significant factorial base digit of 3 ("11") gives "10", 2, clearing the digit-1 gives "01" = 1, and clearing any digit past the most significant keeps "11" as it is, 3]. 4, 0, 4, 4, 4 4, 1, 5, 5, 5 6, 6, 0, 6, 6 6, 7, 1, 7, 7 8, 6, 2, 8, 8 8, 7, 3, 9, 9 10, 6, 4, 10, 10 10, 7, 5, 11, 11 12, 12, 0, 12, 12 12, 13, 1, 13, 13 14, 12, 2, 14, 14 14, 13, 3, 15, 15 16, 12, 4, 16, 16 16, 13, 5, 17, 17 18, 18, 0, 18, 18 18, 19, 1, 19, 19 20, 18, 2, 20, 20 20, 19, 3, 21, 21 22, 18, 4, 22, 22 22, 19, 5, 23, 23 24, 24, 24, 0, 24 ...
Links
Crossrefs
Programs
-
Scheme
(define (A275730 n) (A275730bi (A002262 n) (A025581 n))) (define (A275730bi n c) (let loop ((z 0) (n n) (m 2) (f 1) (c c)) (let ((d (modulo n m))) (cond ((zero? n) z) ((zero? c) (loop z (/ (- n d) m) (+ 1 m) (* f m) (- c 1))) (else (loop (+ z (* f d)) (/ (- n d) m) (+ 1 m) (* f m) (- c 1)))))))