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

A319023 Let S be the sequence generated by these rules: 1 is in S, and if k is in S, then A057168(k) and A319021(k) are in S, and duplicates are deleted as they occur; a(n) is the n-th term of S.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 8, 6, 7, 10, 27, 16, 14, 11, 12, 29, 81, 32, 20, 19, 13, 17, 18, 30, 31, 82, 243, 64, 34, 24, 22, 21, 15, 23, 28, 39, 36, 47, 33, 84, 245, 729, 128, 66, 38, 25, 35, 43, 45, 40, 54, 55, 49, 37, 88, 90, 246, 247, 730, 2187, 256, 130, 68, 72, 41
Offset: 1

Views

Author

Rémy Sigrist, Sep 08 2018

Keywords

Comments

This sequence is a permutation of the natural numbers (with inverse A319024):
- this sequence is injective,
- this sequence is surjective: by contradiction:
- let m be the least integer missing from the sequence,
- as a(1) = 1, we have m > 1,
- also, m belongs to A000225 and to A062318,
- however the only positive integer belonging to both sequences is 1,
- hence a contradiction, QED.

Examples

			The first terms, alongside b(n) = A057168(a(n)) and t(n) = A319021(a(n)), are:
  n   a(n)  b(n)  t(n)
  --  ----  ----  ----
   1     1     2     3
   2     2     4     4
   3     3     5     9
   4     4     8     6
   5     5     6     7
   6     9    10    27
   7     8    16    14
   8     6     9    10
   9     7    11    11
  10    10    12    12
  11    27    29    81
  12    16    32    20
  13    14    19    16
  14    11    13    13
  15    12    17    18
  16    29    30    31
  17    81    82   243
  18    32    64    34
  19    20    24    22
  20    19    21    21
		

Crossrefs

Programs

  • PARI
    See Links section.

A343604 a(n) is the least number > n with the same sum of balanced ternary digits as n.

Original entry on oeis.org

2, 3, 6, 7, 10, 15, 8, 9, 16, 11, 12, 19, 22, 31, 42, 17, 18, 23, 20, 21, 24, 25, 28, 43, 26, 27, 32, 29, 30, 33, 34, 37, 46, 35, 36, 49, 38, 39, 58, 67, 94, 123, 44, 45, 50, 47, 48, 51, 52, 55, 68, 53, 54, 59, 56, 57, 60, 61, 64, 69, 62, 63, 70, 65, 66, 73
Offset: 0

Views

Author

Rémy Sigrist, Apr 22 2021

Keywords

Comments

This sequence can be extended to negative indexes by setting a(-n) = -A343605(n) for any n > 0.

Examples

			The first terms, in base 10 and in balanced ternary (where T denotes the digit -1), alongside A065363(n), are:
  n   a(n)  bter(n)  bter(a(n))  A065363(n)
  --  ----  -------  ----------  ----------
   0     2        0          1T           0
   1     3        1          10           1
   2     6       1T         1T0           0
   3     7       10         1T1           1
   4    10       11         101           2
   5    15      1TT        1TT0          -1
   6     8      1T0         10T           0
   7     9      1T1         100           1
   8    16      10T        1TT1           0
   9    11      100         11T           1
  10    12      101         110           2
  11    19      11T        1T01           1
  12    22      110        1T11           2
		

Crossrefs

Programs

  • PARI
    A065363(n) = { my (v=0, d); while (n, v+=d=centerlift(Mod(n,3)); n=(n-d)\3); v }
    a(n) = my (s=A065363(n)); for (k=n+1, oo, if (s==A065363(k), return (k)))

Formula

a(9*n) = 9*n + 2.
a(A174658(n)) = A174658(n+1).
Showing 1-2 of 2 results.