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.

A331274 a(n) is the greatest binary anagram of n not yet in the sequence.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 12, 10, 14, 9, 13, 11, 15, 16, 24, 20, 28, 18, 26, 25, 30, 17, 22, 21, 29, 19, 27, 23, 31, 32, 48, 40, 56, 36, 52, 50, 60, 34, 49, 44, 58, 42, 57, 54, 62, 33, 41, 38, 53, 37, 51, 46, 61, 35, 45, 43, 59, 39, 55, 47, 63, 64, 96, 80, 112
Offset: 1

Views

Author

Rémy Sigrist, Jan 13 2020

Keywords

Comments

Leading zeros are ignored.
This sequence is a self-inverse permutation of the natural numbers.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   1     1       1          1
   2     2      10         10
   3     3      11         11
   4     4     100        100
   5     6     101        110
   6     5     110        101
   7     7     111        111
   8     8    1000       1000
   9    12    1001       1100
  10    10    1010       1010
  11    14    1011       1110
  12     9    1100       1001
  13    13    1101       1101
  14    11    1110       1011
  15    15    1111       1111
		

Crossrefs

Cf. A007318, A187769, A298847, A331275 (ternary analog).

Programs

  • PARI
    \\ See Links section.

Formula

a(A187769(n, k)) = A187769(n, A007318(n-1)+1-k) for any n > 0 and k = 1..A007318(n-1).

A352760 Lexigraphically earliest sequence of distinct nonnegative integers such that for any n >= 0, among the ternary digits of n and a(n) (counted with multiplicity) there are as many 1's as 2's.

Original entry on oeis.org

0, 2, 1, 6, 8, 5, 3, 7, 4, 17, 20, 11, 24, 26, 18, 15, 23, 9, 14, 19, 10, 21, 25, 16, 12, 22, 13, 35, 53, 29, 56, 62, 47, 33, 51, 27, 60, 74, 54, 78, 80, 71, 59, 72, 44, 45, 61, 32, 65, 77, 50, 34, 52, 28, 38, 55, 30, 57, 69, 42, 36, 46, 31, 63, 73, 48, 75, 79
Offset: 0

Views

Author

Rémy Sigrist, Jul 05 2022

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			The first terms, alongside their ternary expansions, are:
  n   a(n)  ter(n)  ter(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     2       1          2
   2     1       2          1
   3     6      10         20
   4     8      11         22
   5     5      12         12
   6     3      20         10
   7     7      21         21
   8     4      22         11
   9    17     100        122
  10    20     101        202
  11    11     102        102
  12    24     110        220
		

Crossrefs

Cf. A004488, A039001 (fixed points), A331275, A355504.

Programs

  • PARI
    See Links section.

Formula

a(n) = n iff n belongs to A039001.
a(n) < 3^k iff n < 3^k.

A337305 a(n) is the greatest number m not yet in the sequence such that the ternary expansions of n and of m have the same runs of consecutive equal digits (up to order but with multiplicity).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 21, 12, 13, 22, 19, 16, 25, 18, 15, 20, 11, 14, 23, 24, 17, 26, 27, 28, 63, 30, 37, 64, 57, 48, 75, 36, 31, 66, 39, 40, 67, 58, 49, 76, 55, 46, 69, 34, 43, 70, 73, 52, 79, 54, 45, 56, 33, 42, 65, 60, 61, 74, 29, 32, 59, 38, 41
Offset: 0

Views

Author

Rémy Sigrist, Aug 22 2020

Keywords

Comments

This sequence is the base 3 analog of A337304.
This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			For n = 144:
- the ternary representation of 144 is "12100",
- the corresponding runs of consecutive equal digits are: "1", "2", "1", "00",
- there are five numbers k with the same multiset of runs:
    k    ter(k)
    ---  -------
     86  "10012"
     88  "10021"
    136  "12001"
    144  "12100"
    190  "21001"
- so a(86) = 190,
     a(88) = 144,
     a(136) = 136,
     a(144) = 88,
     a(190) = 86.
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-3 of 3 results.