A380273
Irregular table T(n, k), n >= 0, k = 1..A380272(n), read by rows; the n-th row lists the integers m in 0..n such that the nonadjacent forms for m-n and m can be added without carries.
Original entry on oeis.org
0, 0, 1, 0, 2, 0, 3, 0, 1, 3, 4, 0, 1, 4, 5, 0, 6, 0, 7, 0, 1, 2, 6, 7, 8, 0, 1, 8, 9, 0, 2, 8, 10, 0, 11, 0, 1, 11, 12, 0, 1, 12, 13, 0, 14, 0, 3, 4, 11, 12, 15, 0, 1, 2, 3, 4, 5, 11, 12, 13, 14, 15, 16, 0, 1, 4, 5, 12, 13, 16, 17, 0, 2, 16, 18, 0, 3, 4, 15, 16, 19
Offset: 0
Table T(n, k) begins:
n n-th row
-- ----------------------------------------
0 0
1 0, 1
2 0, 2
3 0, 3
4 0, 1, 3, 4
5 0, 1, 4, 5
6 0, 6
7 0, 7
8 0, 1, 2, 6, 7, 8
9 0, 1, 8, 9
10 0, 2, 8, 10
11 0, 11
12 0, 1, 11, 12
13 0, 1, 12, 13
14 0, 14
15 0, 3, 4, 11, 12, 15
16 0, 1, 2, 3, 4, 5, 11, 12, 13, 14, 15, 16
-
ok(x, y) = { my (dx, dy, p = 0, q); while (x || y, if (x % 2, x -= dx = 2 - (x%4), dx = 0); if (y % 2, y -= dy = 2 - (y%4), dy = 0); if (dx && dx==dy, return (0);); q = dx + dy; if (p && q, return (0);); x /= 2; y /= 2; p = q;); return (1); }
row(n) = select(k -> ok(n-k, k), [0..n])
A341691
a(0) = 0, and for any n > 0, a(n) = n - a(k) where k is the greatest number < n such that n AND a(k) = a(k) (where AND denotes the bitwise AND operator).
Original entry on oeis.org
0, 1, 2, 1, 4, 1, 2, 5, 8, 1, 2, 9, 4, 9, 10, 5, 16, 1, 2, 17, 4, 17, 18, 5, 8, 17, 18, 9, 20, 9, 10, 21, 32, 1, 2, 33, 4, 33, 34, 5, 8, 33, 34, 9, 36, 9, 10, 37, 16, 33, 34, 17, 36, 17, 18, 37, 40, 17, 18, 41, 20, 41, 42, 21, 64, 1, 2, 65, 4, 65, 66, 5, 8, 65
Offset: 0
The first terms, alongside the corresponding value of k, are:
n a(n) k
-- ---- ---
0 0 N/A
1 1 0
2 2 0
3 1 2
4 4 0
5 1 4
6 2 4
7 5 6
8 8 0
9 1 8
A363930
Irregular table T(n, k), n >= 0, k = 1..A363710(n), read by rows; the n-th row lists the nonnegative numbers m <= n such that A003188(m) AND A003188(n-m) = 0 (where AND denotes the bitwise AND operator).
Original entry on oeis.org
0, 0, 1, 0, 2, 0, 3, 0, 1, 3, 4, 0, 1, 4, 5, 0, 6, 0, 7, 0, 1, 7, 8, 0, 1, 2, 3, 6, 7, 8, 9, 0, 2, 3, 7, 8, 10, 0, 3, 8, 11, 0, 1, 3, 9, 11, 12, 0, 1, 12, 13, 0, 14, 0, 15, 0, 1, 15, 16, 0, 1, 2, 3, 14, 15, 16, 17, 0, 2, 3, 4, 6, 12, 14, 15, 16, 18, 0, 3, 4, 7, 12, 15, 16, 19
Offset: 0
Table T(n, k) begins:
n n-th row
-- ----------------------
0 0
1 0, 1
2 0, 2
3 0, 3
4 0, 1, 3, 4
5 0, 1, 4, 5
6 0, 6
7 0, 7
8 0, 1, 7, 8
9 0, 1, 2, 3, 6, 7, 8, 9
10 0, 2, 3, 7, 8, 10
11 0, 3, 8, 11
12 0, 1, 3, 9, 11, 12
13 0, 1, 12, 13
14 0, 14
15 0, 15
16 0, 1, 15, 16
-
row(n) = { select (m -> bitand(bitxor(m, m\2), bitxor(n-m, (n-m)\2))==0, [0..n]) }
A374448
Irregular table T(n, k), n >= 0, 0 <= k < A089898(n), read by rows; the n-th row lists the numbers m in the range 0..n such that m and n-m can be added without carries in base 10.
Original entry on oeis.org
0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 0, 1, 10, 11, 0, 1, 2, 10, 11, 12, 0, 1, 2, 3, 10, 11, 12, 13, 0, 1, 2, 3, 4, 10, 11, 12, 13, 14
Offset: 0
Table T(n, k) begins:
n n-th row
-- ---------------------------------
0 0
1 0, 1
2 0, 1, 2
3 0, 1, 2, 3
4 0, 1, 2, 3, 4
5 0, 1, 2, 3, 4, 5
6 0, 1, 2, 3, 4, 5, 6
7 0, 1, 2, 3, 4, 5, 6, 7
8 0, 1, 2, 3, 4, 5, 6, 7, 8
9 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
10 0, 10
11 0, 1, 10, 11
12 0, 1, 2, 10, 11, 12
13 0, 1, 2, 3, 10, 11, 12, 13
14 0, 1, 2, 3, 4, 10, 11, 12, 13, 14
-
T(n, k, base = 10) = { my (v = 0, p = 1, d, t); while (n, d = n % base; n \= base; t = k % (d+1); k \= (d+1); v += t * p; p *= base;); return (v); }
Comments