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-6 of 6 results.

A269367 Suspected permutation of natural numbers: a(n) = A255070(A269363(n)).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 11, 6, 8, 12, 17, 13, 10, 21, 23, 19, 14, 18, 16, 28, 20, 15, 35, 30, 41, 24, 39, 27, 22, 42, 25, 36, 26, 47, 40, 29, 34, 32, 33, 37, 55, 38, 51, 49, 43, 59, 67, 57, 68, 58, 69, 64, 65, 75, 119, 76, 66, 74, 52, 46, 44, 50, 87, 90, 56, 71, 111, 45, 85, 60, 72, 54, 77, 104, 79, 99, 88, 95, 48, 53, 78, 102, 82, 31
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2016

Keywords

Comments

Lexicographically first injection of natural numbers beginning with a(1)=1 such that for all n >= 1, A091067(a(n))*A091067(a(n+1)) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.

Crossrefs

Left inverse: A269368 (also the right inverse if this is a permutation of natural numbers).

Formula

a(n) = A255070(A269363(n)).

A269366 a(1) = 1, a(2n) = A269361(1+a(n)), a(2n+1) = A269363(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 12, 16, 15, 9, 11, 10, 22, 13, 24, 18, 38, 40, 48, 33, 46, 20, 14, 32, 27, 17, 19, 25, 44, 29, 28, 50, 75, 21, 30, 72, 71, 73, 70, 133, 139, 113, 76, 129, 91, 42, 35, 36, 23, 37, 54, 45, 51, 26, 43, 49, 39, 82, 62, 128, 107, 80, 56, 53, 83, 114, 140, 109, 214, 52, 59, 34, 47, 149, 150, 141, 123, 221, 111, 121
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2016

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A269361(1+n), and each right hand child as A269363(n), when the parent node contains n:
|
...................1...................
2 3
4......../ \........6 5......../ \........7
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 12 16 15 9 11 10 22
13 24 18 38 40 48 33 46 20 14 32 27 17 19 25 44
etc.
An example of (suspected) "entanglement permutation" where the other pair of complementary sequences is generated by a greedy algorithm.
Sequence is not only injective, but also surjective on N (thus a permutation of natural numbers) provided that A269361 is surjective on A091072 and A269363 is surjective on A091067.

Crossrefs

Left inverse: A269365 (also right inverse, if this sequence is a permutation of natural numbers).

A266121 Lexicographically first injection of natural numbers beginning with a(1)=1 such that 1+(a(n)*a(n+1)) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.

Original entry on oeis.org

1, 3, 5, 4, 2, 8, 9, 7, 12, 6, 14, 24, 11, 13, 20, 16, 10, 26, 40, 17, 15, 39, 28, 19, 27, 25, 23, 48, 22, 30, 44, 31, 33, 32, 18, 36, 29, 47, 45, 52, 21, 55, 49, 84, 61, 43, 51, 53, 80, 34, 64, 37, 35, 59, 75, 117, 93, 91, 57, 41, 100, 82, 50, 104, 42, 98, 106, 90, 114, 72, 58, 144, 65, 63, 151, 56, 38, 54, 76, 71, 60
Offset: 1

Views

Author

Antti Karttunen, Dec 23 2015

Keywords

Comments

It is conjectured that this sequence is not only injective, but also surjective on N, i.e., that it is a true permutation of natural numbers.
A similar sequence, but with condition that "(a(n)*a(n+1)) must be a member of A003714" yields a sequence: 1, 2, 4, 5, 8, 9, 16, 10, 13, 20, ... (A269361) which certainly is not a bijection, because it contains only terms of A091072.
Also, with above condition and the initial value a(1) = 3 the algorithm generates A269363 which contains only terms of A091067. See also A266191.

Examples

			After the initial a(1) = 1, for obtaining the value of a(2) we try the first unused number, which is 2, but (1*2)+1 = 3, which in binary is "11", thus 2 is not qualified at this point of time. So next we try 3, and (1*3)+1 = 4, which in binary is "100", and that satisfies our criterion (no adjacent 1-bits), thus we set a(2) = 3.
For a(3), we test with the least unused numbers 2, 4, 5, etc., yielding products (3*2)+1 = 7 = "111", (3*4)+1 = 13 = "1101" and (3*5)+1 = 16 = "10000" in binary, and only 5 satisfies the criterion, thus we set a(3) = 5.
		

Crossrefs

Left inverse: A266122 (also the right inverse if this sequence is a permutation of natural numbers).
Cf. also A266191 and A266117 for similar permutations.

Extensions

Minor typo in the description corrected by Antti Karttunen, Feb 25 2016

A255070 (1/2)*(n minus number of runs in the binary expansion of n): a(n) = (n - A005811(n)) / 2 = A236840(n)/2.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 3, 4, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8, 9, 10, 11, 11, 11, 12, 13, 13, 14, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 18, 19, 20, 20, 21, 22, 23, 23, 23, 24, 24, 24, 25, 26, 27, 27, 27, 28, 29, 29, 30, 31, 31, 31, 31, 32, 32, 32, 33, 34, 34, 34, 34, 35
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Crossrefs

Least inverse: A091067 (also the positions of records).
Greatest inverse: A255068.
Run lengths: A106836.

Programs

  • Mathematica
    a[n_] := (n - Length@ Split[IntegerDigits[n, 2]])/2; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 16 2023 *)
  • Scheme
    (define (A255070 n) (/ (A236840 n) 2))

Formula

a(n) = A236840(n) / 2 = (n - A005811(n)) / 2.
Other identities:
a(A091067(n)) = n for all n >= 1.
a(A255068(n)) = n for all n >= 0.
a(A269363(n)) = A269367(n). - Antti Karttunen, Aug 12 2019

A269361 Lexicographically first injection of natural numbers beginning with a(1)=1 such that a(n)*a(n+1) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 16, 10, 13, 20, 17, 32, 18, 29, 36, 33, 40, 26, 21, 49, 42, 52, 25, 41, 50, 82, 57, 45, 53, 80, 34, 64, 37, 113, 74, 125, 84, 61, 72, 58, 73, 65, 68, 69, 128, 66, 129, 132, 133, 77, 114, 81, 117, 90, 104, 85, 98, 89, 93, 100, 105, 161, 106, 97, 169, 122, 137, 157, 138, 136, 121, 141, 149, 221, 153, 109, 160, 116, 144
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2016

Keywords

Comments

The sequence is conjectured to be a permutation of A091072.

Crossrefs

A269368 a(n) = index of n in A269367 or 0 if n is not present in that sequence.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 6, 10, 7, 14, 8, 11, 13, 18, 23, 20, 12, 19, 17, 22, 15, 30, 16, 27, 32, 34, 29, 21, 37, 25, 85, 39, 40, 38, 24, 33, 41, 43, 28, 36, 26, 31, 46, 62, 69, 61, 35, 80, 45, 63, 44, 60, 81, 73, 42, 66, 49, 51, 47, 71, 87, 93, 129, 53, 54, 58, 48, 50, 52, 88, 67, 72, 86, 59, 55, 57, 74, 82, 76, 104, 106, 84
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2016

Keywords

Comments

If A269367 is really a permutation of natural numbers, then this sequence is also, and no hypothetical zero-values are ever needed.

Crossrefs

Inverse: A269367.
Cf. also A266122, A269363.

Programs

  • Scheme
    ;; Use the code in A269367.
Showing 1-6 of 6 results.