This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A268830 #23 Mar 28 2021 07:00:55 %S A268830 0,1,0,2,1,0,3,4,1,0,4,2,3,1,0,5,6,2,3,1,0,6,8,9,2,3,1,0,7,3,8,9,2,3, %T A268830 1,0,8,7,5,5,6,2,3,1,0,9,10,4,4,7,8,2,3,1,0,10,12,13,6,4,6,7,2,3,1,0, %U A268830 11,15,12,13,5,4,6,7,2,3,1,0,12,11,17,17,18,5,4,6,7,2,3,1,0,13,5,16,16,19,20,5,4,6,7,2,3,1,0,14,13,7,18,16,18,19,5,4,6,7,2,3,1,0 %N A268830 Square array A(r,c): A(0,c) = c, A(r,0) = 0, A(r>=1,c>=1) = 1+A(r-1,A268718(c)-1) = 1 + A(r-1, A003188(A006068(c)-1)), read by descending antidiagonals. %H A268830 Antti Karttunen, <a href="/A268830/b268830.txt">Table of n, a(n) for n = 0..32895; the first 256 antidiagonals of array</a> %e A268830 The top left [0 .. 16] x [0 .. 19] section of the array: %e A268830 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 %e A268830 0, 1, 4, 2, 6, 8, 3, 7, 10, 12, 15, 11, 5, 13, 16, 14, 18, 20, 23, 19 %e A268830 0, 1, 3, 2, 9, 8, 5, 4, 13, 12, 17, 16, 7, 6, 15, 14, 21, 20, 25, 24 %e A268830 0, 1, 3, 2, 9, 5, 4, 6, 13, 17, 16, 18, 10, 8, 15, 7, 21, 25, 24, 26 %e A268830 0, 1, 3, 2, 6, 7, 4, 5, 18, 19, 16, 17, 10, 11, 8, 9, 26, 27, 24, 25 %e A268830 0, 1, 3, 2, 8, 6, 4, 5, 20, 18, 9, 17, 7, 11, 10, 12, 28, 26, 33, 25 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 19, 18, 11, 10, 9, 8, 13, 12, 27, 26, 35, 34 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 19, 11, 14, 12, 8, 10, 13, 9, 27, 35, 38, 36 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 12, 13, 14, 15, 8, 9, 10, 11, 36, 37, 38, 39 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 14, 16, 11, 15, 8, 9, 12, 10, 38, 40, 35, 39 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 17, 16, 13, 12, 8, 9, 11, 10, 41, 40, 37, 36 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 17, 13, 12, 14, 8, 9, 11, 10, 41, 37, 36, 38 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 14, 15, 12, 13, 8, 9, 11, 10, 38, 39, 36, 37 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 16, 14, 12, 13, 8, 9, 11, 10, 40, 38, 21, 37 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10, 39, 38, 23, 22 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10, 39, 23, 26, 24 %e A268830 0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10, 24, 25, 26, 27 %o A268830 (Scheme) %o A268830 (define (A268830 n) (A268830bi (A002262 n) (A025581 n))) ;; o=0: Square array of shifted powers of A268718. %o A268830 (define (A268830bi row col) (cond ((zero? row) col) ((zero? col) 0) (else (+ 1 (A268830bi (- row 1) (- (A268718 col) 1)))))) %o A268830 (define (A268830bi row col) (cond ((zero? row) col) ((zero? col) 0) (else (+ 1 (A268830bi (- row 1) (A003188 (+ -1 (A006068 col)))))))) %o A268830 (Python) %o A268830 def a003188(n): return n^(n>>1) %o A268830 def a006068(n): %o A268830 s=1 %o A268830 while True: %o A268830 ns=n>>s %o A268830 if ns==0: break %o A268830 n=n^ns %o A268830 s<<=1 %o A268830 return n %o A268830 def a278618(n): return 0 if n==0 else 1 + a003188(a006068(n) - 1) %o A268830 def A(r, c): return c if r==0 else 0 if c==0 else 1 + A(r - 1, a278618(c) - 1) %o A268830 for r in range(21): print([A(c, r - c) for c in range(r + 1)]) # _Indranil Ghosh_, Jun 07 2017 %Y A268830 Cf. A003188, A006068. %Y A268830 Inverses of these permutations can be found in table A268820. %Y A268830 Row 0: A001477, Row 1: A268718, Row 2: A268822, Row 3: A268824, Row 4: A268826, Row 5: A268828, Row 6: A268832, Row 7: A268934. %Y A268830 Rows converge towards A006068. %K A268830 nonn,tabl %O A268830 0,4 %A A268830 _Antti Karttunen_, Feb 14 2016