cp's OEIS Frontend

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.

Previous Showing 11-14 of 14 results.

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

Views

Author

Rémy Sigrist, Jan 18 2025

Keywords

Comments

The nonadjacent forms for two integers, say Sum_{i >= 0} x_i * 2^i and Sum_{i >= 0} y_i * 2^i, can be added without carries iff for any i >= 0:
- abs(x_i + y_i) <= 1,
- (x_i + y_i) * (x_{i+1} + y_{i+1}) = 0.

Examples

			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
		

Crossrefs

See A295989 and A353174 for similar sequences.
Cf. A380272.

Programs

  • PARI
    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])

Formula

T(n, 1) = 0.
T(n, A380272(n)) = 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

Views

Author

Rémy Sigrist, Feb 17 2021

Keywords

Comments

This sequence is a binary variant of A341679; here we look for a term whose binary 1's match those of n, there we look for a term that divides n.

Examples

			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
		

Crossrefs

Programs

  • C
    See Links section.

Formula

a(n) = n iff n = 0 or n is a power of 2.
a(2*n) = 2*a(n).
Apparently, a(n) = n - a(n - A006519(n)).

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

Views

Author

Rémy Sigrist, Jun 28 2023

Keywords

Comments

This sequence is related to the T-square fractal (see A363710).

Examples

			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
		

Crossrefs

See A295989, A353174 and A362327 for similar sequences.

Programs

  • PARI
    row(n) = { select (m -> bitand(bitxor(m, m\2), bitxor(n-m, (n-m)\2))==0, [0..n]) }

Formula

T(n, 1) = 0.
T(n, A363710(n)) = n.
T(n, k) + T(n, A363710(n)+1-k) = 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

Views

Author

Rémy Sigrist, Jul 08 2024

Keywords

Comments

The n-th row lists the numbers m such that for any k > 0, the k-th rightmost digit of m is <= the k-th rightmost digit of n.

Examples

			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
		

Crossrefs

Cf. A002262, A089898, A295989 (base-2 analog).

Programs

  • PARI
    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); }

Formula

T(n, 0) = 0.
T(n, A089898(n)-1) = n.
T(n, k) + T(n, A089898(n)-1-k) = n.
T(10*n, k) = 10*T(n, k).
Previous Showing 11-14 of 14 results.