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.

A345297 a(n) is the least k >= 0 such that A331835(k) = n.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 22, 23, 26, 27, 29, 30, 31, 43, 45, 46, 47, 54, 55, 58, 59, 61, 62, 63, 94, 95, 107, 109, 110, 111, 118, 119, 122, 123, 125, 126, 127, 187, 189, 190, 191, 222, 223, 235, 237, 238, 239, 246, 247, 250, 251, 253, 254, 255
Offset: 0

Views

Author

Rémy Sigrist, Jun 13 2021

Keywords

Comments

Sequence A200947 gives the position of the last occurrence of a number in A331835.

Examples

			We have:
           n|  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18
  ----------+------------------------------------------------------------------
  A331835(n)|  0  1  2  3  3  4  5  6  5  6   7   8   8   9  10  11   7   8   9
So a(0) = 0,
   a(1) = 1,
   a(2) = 2,
   a(3) = 3,
   a(4) = 5,
   a(5) = 6,
   a(6) = 7,
   a(7) = 10,
   a(8) = 11,
   a(9) = 13,
   a(10) = 14,
   a(11) = 15.
		

Crossrefs

Programs

  • C
    See Links section.
    
  • Python
    from sympy import prime
    def p(n): return prime(n) if n >= 1 else 1
    def A331835(n): return sum(p(i)*int(b) for i, b in enumerate(bin(n)[:1:-1]))
    def adict(klimit):
        adict = dict()
        for k in range(klimit+1):
            fk = A331835(k)
            if fk not in adict: adict[fk] = k
        n, alst = 0, []
        while n in adict: alst.append(adict[n]); n += 1
        return alst
    print(adict(255)) # Michael S. Branicky, Jun 13 2021

Formula

a(A014284(n)) = 2^n - 1.
a(n) <= A200947(n).

A368577 Irregular table T(n, k), n >= 0, k = 1..A036497(n), read by rows; the n-th row lists the numbers m such that A331835(m) = n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 16, 11, 12, 17, 13, 18, 14, 19, 20, 15, 21, 32, 22, 24, 33, 23, 25, 34, 64, 26, 35, 36, 65, 27, 28, 37, 66, 29, 38, 40, 67, 68, 30, 39, 41, 69, 128, 31, 42, 48, 70, 72, 129, 43, 44, 49, 71, 73, 130, 256, 45, 50, 74, 80, 131, 132, 257
Offset: 0

Views

Author

Rémy Sigrist, Dec 31 2023

Keywords

Comments

As a flat sequence, this is a permutation of the nonnegative integers (with inverse A368578).

Examples

			Table T(n, k) begins:
  n   n-th row
  --  ------------------
   0  0
   1  1
   2  2
   3  3, 4
   4  5
   5  6, 8
   6  7, 9
   7  10, 16
   8  11, 12, 17
   9  13, 18
  10  14, 19, 20
  11  15, 21, 32
  12  22, 24, 33
  13  23, 25, 34, 64
  14  26, 35, 36, 65
  15  27, 28, 37, 66
  16  29, 38, 40, 67, 68
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

T(n, 1) = A345297(n).
T(n, A036497(n)) = A200947(n).
Showing 1-2 of 2 results.