A268714 Square array A(i,j) = A006068(i) + A006068(j), read by antidiagonals.
0, 1, 1, 3, 2, 3, 2, 4, 4, 2, 7, 3, 6, 3, 7, 6, 8, 5, 5, 8, 6, 4, 7, 10, 4, 10, 7, 4, 5, 5, 9, 9, 9, 9, 5, 5, 15, 6, 7, 8, 14, 8, 7, 6, 15, 14, 16, 8, 6, 13, 13, 6, 8, 16, 14, 12, 15, 18, 7, 11, 12, 11, 7, 18, 15, 12, 13, 13, 17, 17, 12, 10, 10, 12, 17, 17, 13, 13, 8, 14, 15, 16, 22, 11, 8, 11, 22, 16, 15, 14, 8, 9, 9, 16, 14, 21, 21, 9, 9, 21, 21, 14, 16, 9, 9
Offset: 0
Examples
The top left [0 .. 15] x [0 .. 15] section of the array: 0, 1, 3, 2, 7, 6, 4, 5, 15, 14, 12, 13, 8, 9, 11, 10 1, 2, 4, 3, 8, 7, 5, 6, 16, 15, 13, 14, 9, 10, 12, 11 3, 4, 6, 5, 10, 9, 7, 8, 18, 17, 15, 16, 11, 12, 14, 13 2, 3, 5, 4, 9, 8, 6, 7, 17, 16, 14, 15, 10, 11, 13, 12 7, 8, 10, 9, 14, 13, 11, 12, 22, 21, 19, 20, 15, 16, 18, 17 6, 7, 9, 8, 13, 12, 10, 11, 21, 20, 18, 19, 14, 15, 17, 16 4, 5, 7, 6, 11, 10, 8, 9, 19, 18, 16, 17, 12, 13, 15, 14 5, 6, 8, 7, 12, 11, 9, 10, 20, 19, 17, 18, 13, 14, 16, 15 15, 16, 18, 17, 22, 21, 19, 20, 30, 29, 27, 28, 23, 24, 26, 25 14, 15, 17, 16, 21, 20, 18, 19, 29, 28, 26, 27, 22, 23, 25, 24 12, 13, 15, 14, 19, 18, 16, 17, 27, 26, 24, 25, 20, 21, 23, 22 13, 14, 16, 15, 20, 19, 17, 18, 28, 27, 25, 26, 21, 22, 24, 23 8, 9, 11, 10, 15, 14, 12, 13, 23, 22, 20, 21, 16, 17, 19, 18 9, 10, 12, 11, 16, 15, 13, 14, 24, 23, 21, 22, 17, 18, 20, 19 11, 12, 14, 13, 18, 17, 15, 16, 26, 25, 23, 24, 19, 20, 22, 21 10, 11, 13, 12, 17, 16, 14, 15, 25, 24, 22, 23, 18, 19, 21, 20
Links
Crossrefs
Programs
-
Mathematica
A006068[n_] := BitXor @@ Table[Floor[n/2^m], {m, 0, Log[2, n]}]; A006068[0] = 0; A[i_, j_] := A006068[i] + A006068[j]; Table[A[i-j, j], {i, 0, 13}, {j, 0, i}] // Flatten (* Jean-François Alcover, Feb 17 2016 *)
-
PARI
\\ Produces the triangle when the array is read by antidiagonals a(n) = if(n<2, n, 2*a(floor(n/2)) + (n%2 + a(floor(n/2))%2)%2); /* A006068 */ T(i,j) = a(i) + a(j); for(i=0, 13, for(j=0, i, print1(T(i - j, j),", "););print();); \\ Indranil Ghosh, Mar 23 2017
-
Python
# Produces the triangle when the array is read by antidiagonals def A006068(n): return n if n<2 else 2*A006068(n//2) + (n%2 + A006068(n//2)%2)%2 def T(i,j): return A006068(i) + A006068(j) for i in range(14): print([T(i - j, j) for j in range(i + 1)]) # Indranil Ghosh, Mar 23 2017
-
Scheme
(define (A268714 n) (A268714bi (A002262 n) (A025581 n))) (define (A268714bi row col) (+ (A006068 row) (A006068 col)))