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.

Showing 1-3 of 3 results.

A119435 a(n) = (binary reversal of n)-th integer among those positive integers not occurring earlier in the sequence.

Original entry on oeis.org

1, 2, 5, 3, 9, 7, 13, 4, 17, 12, 23, 10, 22, 18, 29, 6, 33, 24, 43, 16, 40, 31, 51, 14, 41, 30, 53, 25, 49, 38, 61, 8, 65, 45, 83, 32, 76, 58, 95, 21, 74, 55, 94, 42, 87, 68, 107, 19, 78, 56, 100, 39, 91, 70, 113, 34, 89, 66, 112, 52, 104, 81, 125, 11, 129, 86, 163, 60, 148
Offset: 1

Views

Author

Leroy Quet, May 19 2006

Keywords

Comments

This sequence is a permutation of the positive integers.
[Proof from N. J. A. Sloane, Apr 20 2022: a(n) always exists, so the sequence is infinite. Every time n is a power of 2, n-reversed is 1, and a(n) is the smallest missing number. Since there are infinitely many powers of 2, every number will eventually appear.]

Examples

			12 in binary is 1100; so its binary reversal is 0011, which is 3 in decimal. Those positive integers not among the first 11 terms of the sequence are 6,8,10,11,14,..., and the third of these is 10, so a(12) = 10.
		

Crossrefs

Cf. A030101, A119436 (inverse).

Programs

  • Mathematica
    Block[{a = {1}, nn = 69}, Do[AppendTo[a, #] &@ Complement[Range[i + 2 nn], #][[FromDigits[#, 2] &@ Reverse@ IntegerDigits[i, 2]]] &@ a, {i, 2, nn}]; a] (* Michael De Vlieger, Sep 03 2017 *)

Extensions

More terms from Diana L. Mecum, Jul 21 2008

A353035 a(n) = A119435(2^n).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 15, 20, 27, 36, 48, 64, 85, 116, 153, 208, 273, 366, 493, 649, 888, 1161, 1579, 2092, 2784, 3783, 4946, 6772, 8875, 11977, 16065, 21193, 28979, 37823, 51633, 68117, 91045, 123377, 161622, 221441, 289493, 392259, 523328, 692771, 945393
Offset: 0

Views

Author

Michael De Vlieger, Apr 18 2022

Keywords

Comments

Local minima of A119435.
Let U(n,j) be the j-th smallest missing number in A119435(1..n-1). Example: for A119435(1..11), U(12,j) begins {6, 8, 10, 11, 14, ...}. Therefore we may alternatively define A119435(n) = U(n, A030101(n)).
Theorem: A119435(2^k) represents a local minimum. Proof: Observe that A030101(2^k) = 1. 2^k expressed in binary is 1 followed by zeros. When we reverse this number, the leading zeros are trivial and we read the number 1 in the 2^0 place. Therefore we select U(2^k, 1), which is the smallest missing number in A119435(1..n-1). Hence, a(n) = A119435(2^n).
Also positions of 2^n in A119436.

Crossrefs

Programs

  • Mathematica
    a = {1}; nn = 2^14; Do[AppendTo[a, Complement[Range[i + 2 nn], a][[IntegerReverse[i, 2]] ]], {i, 2, nn}]; Array[a[[2^#]] &, Floor@ Log2@ Length@ a - 1, 0]
  • PARI
    \\ See Links section.

Extensions

More terms from Rémy Sigrist, Apr 19 2022

A246166 Inverse permutation to sequence A246165.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 5, 16, 12, 10, 7, 9, 32, 24, 20, 14, 11, 18, 15, 64, 48, 40, 13, 28, 22, 36, 30, 21, 17, 27, 25, 128, 96, 26, 19, 80, 56, 44, 72, 60, 23, 42, 34, 33, 54, 50, 35, 256, 45, 192, 29, 38, 52, 160, 112, 88, 144, 39, 31, 120, 46, 84, 68, 66, 108, 100, 37, 70, 55, 49, 512, 63, 51, 90, 58, 384, 41
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2014

Keywords

Crossrefs

Inverse: A246165.
Similar permutations: A119436, A126918.
Showing 1-3 of 3 results.