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.

Previous Showing 21-27 of 27 results.

A072650 Starting from the right (the least significant end) rewrite 0 to 0 and x1 to 1 in the binary expansion of n.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 2, 3, 8, 5, 6, 5, 4, 3, 6, 3, 16, 9, 10, 9, 12, 7, 10, 7, 8, 5, 6, 5, 12, 7, 6, 7, 32, 17, 18, 17, 20, 11, 18, 11, 24, 13, 14, 13, 20, 11, 14, 11, 16, 9, 10, 9, 12, 7, 10, 7, 24, 13, 14, 13, 12, 7, 14, 7, 64, 33, 34, 33, 36, 19, 34, 19, 40, 21, 22, 21, 36, 19, 22, 19
Offset: 0

Views

Author

Antti Karttunen, Jun 02 2002

Keywords

Examples

			I.e. 23 is 10111 in binary, which after rewriting is 111, thus a(23) = 7, while 38 is 100110 in binary, which after the rewriting is 10010, i.e. a(38) = 18.
		

Crossrefs

Formula

A048679(n) = a(A003714(n)).

A227351 Permutation of nonnegative integers: map each number by lengths of runs of zeros in its Zeckendorf expansion shifted once left to the number which has the same lengths of runs (in the same order, but alternatively of runs of 0's and 1's) in its binary representation.

Original entry on oeis.org

0, 1, 3, 7, 2, 15, 6, 4, 31, 14, 12, 8, 5, 63, 30, 28, 24, 13, 16, 9, 11, 127, 62, 60, 56, 29, 48, 25, 27, 32, 17, 19, 23, 10, 255, 126, 124, 120, 61, 112, 57, 59, 96, 49, 51, 55, 26, 64, 33, 35, 39, 18, 47, 22, 20, 511, 254, 252, 248, 125, 240, 121, 123, 224
Offset: 0

Views

Author

Antti Karttunen, Jul 08 2013

Keywords

Comments

This permutation is based on the fact that by appending one extra zero to the right of Fibonacci number representation of n (aka "Zeckendorf expansion") and then counting the lengths of blocks of consecutive (nonleading) zeros we get bijective correspondence with compositions, and thus also with the binary representation of a unique n. See the chart below:
n A014417(n) A014417(A022342(n+1)) Runs of Binary number In dec.
[shifted once left] zeros with same runs = a(n)
0: ......0 ......0 [] .....0 0
1: ......1 .....10 [1] .....1 1
2: .....10 ....100 [2] ....11 3
3: ....100 ...1000 [3] ...111 7
4: ....101 ...1010 [1,1] ....10 2
5: ...1000 ..10000 [4] ..1111 15
6: ...1001 ..10010 [2,1] ...110 6
7: ...1010 ..10100 [1,2] ...100 4
8: ..10000 .100000 [5] .11111 31
9: ..10001 .100010 [3,1] ..1110 14
10: ..10010 .100100 [2,2] ..1100 12
11: ..10100 .101000 [1,3] ..1000 8
12: ..10101 .101010 [1,1,1] ...101 5
13: .100000 1000000 [6] 111111 63
Are there any other fixed points after 0, 1, 6, 803, 407483 ?

Crossrefs

Inverse permutation: A227352. Cf. also A003714, A014417, A006068, A048679.
Could be further composed with A075157 or A075159, also A129594.

Programs

Formula

a(n) = A006068(A048679(n)) = A006068(A106151(2*A003714(n))).
This permutation effects following correspondences:
a(A000045(n)) = A000225(n-1).
a(A027941(n)) = A000975(n).
For n >=3, a(A000204(n)) = A000079(n-2).

A056017 Permutation of nonnegative integers formed by ranking fibbinary numbers (A003714) as if they were representatives of the circular binary sequences with forbidden -11- subsequence.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 08 2000

Keywords

Comments

Function CircBinSeqNo11Rank gives the position of any 11-free binary sequence in this sequence, where each block consists of Lucas(n-2) sequences of length n: (either the leftmost or the rightmost digit is 1, but not both).
In this permutation the Fibonacci numbers themselves (A000045) are fixed.

Examples

			0; 01,10; 100; 0101,1000,1010; 01001,10000,10010,10100; 010001,010101,100000,100010,100100,101000,101010; etc.
		

Crossrefs

Inverse permutation: A056018. For fibbinary function see A048679, interpret_as_zeckendorf_expansion given in A048680.

Programs

  • Maple
    CircBinSeqNo11Rank := n -> fibonacci(floor_log_2(n)+1-((-1)^n)) + interpret_as_zeckendorf_expansion(floor(n/(3-((-1)^n))));

Formula

[seq(CycBinSeqNo11Rank(fibbinary(j)), j=0..233)];
a[0] = 0, a[n] = CircBinSeqNo11Rank(fibbinary(n)) for n >= 1.

A072794 Inverse permutation to A072793.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 10, 8, 9, 12, 11, 14, 15, 16, 21, 13, 23, 17, 18, 36, 19, 20, 25, 22, 27, 28, 29, 40, 30, 31, 38, 24, 44, 45, 46, 55, 26, 57, 32, 33, 78, 34, 35, 42, 37, 82, 49, 50, 59, 39, 61, 47, 48, 136, 53, 54, 63, 56, 65, 66, 67, 86, 68, 69, 80, 41, 90, 91, 92
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2002

Keywords

Crossrefs

Composition of A054239 & A048679.

A379658 The balanced ternary expansion of a(n) is obtained by removing a digit 0 before each nonzero digit in the nonadjacent form of n.

Original entry on oeis.org

0, 1, 3, 2, 9, 4, 6, 8, 27, 10, 12, 5, 18, 7, 24, 26, 81, 28, 30, 11, 36, 13, 15, 17, 54, 19, 21, 23, 72, 25, 78, 80, 243, 82, 84, 29, 90, 31, 33, 35, 108, 37, 39, 14, 45, 16, 51, 53, 162, 55, 57, 20, 63, 22, 69, 71, 216, 73, 75, 77, 234, 79, 240, 242, 729
Offset: 0

Views

Author

Rémy Sigrist, Dec 29 2024

Keywords

Comments

A permutation of the nonnegative integers with inverse A379657.

Examples

			The first terms are:
  n   a(n)  naf(n)  bter(a(n))
  --  ----  ------  ----------
   0     0       0           0
   1     1       1           1
   2     3      10          10
   3     2     10T          1T
   4     9     100         100
   5     4     101          11
   6     6    10T0         1T0
   7     8    100T         10T
   8    27    1000        1000
   9    10    1001         101
  10    12    1010         110
  11     5   10T0T         1TT
  12    18   10T00        1T00
		

Crossrefs

See A048679 for a similar sequence.
Cf. A065363, A334913, A379657 (inverse).

Programs

  • PARI
    a(n) = { my (v = 0, t = 1, d); while (n, if (n%2, n -= d = 2 - (n%4); v += d*t; t /= 3;); n \= 2; t *= 3;); return (v); }

Formula

A065363(a(n)) = A334913(n).

A358733 Permutation of the nonnegative integers such that A358654(p(n) - 1) = A200714(n) for n > 0 where p(n) is described in Comments.

Original entry on oeis.org

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

Views

Author

Mikhail Kurkov, Mar 13 2023 [verification needed]

Keywords

Comments

Here p(n) = n + a(d(n)) - d(n) for n > 0 where d(n) = c(b(n)), b(n) = f(g(n) + 2) - n - 1 for n > 0 with b(0) = 0, c(n) = f(g(n) + 3) - n - 1 for n > 0 with c(0) = 0, f(n) = A000045(n) and where g(n) = A072649(n). To compute p(n) we need to know a(d(n)) and to compute a(n) we need to know p(e(n)) where e(n) = n - f(g(n) + 1) for n > 0 with e(0) = 0 in the sense that we can rewrite a(n) = n + [e(n) > 0]*(a(h(n)) - h(n) ...) (here h(n) = d(e(n))) as a(n) = n - e(n) + [e(n) > 0]*(p(e(n)) ...).

Crossrefs

Programs

  • PARI
    g(n)=local(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2) \\ from A072649
    d(n) = { while(n>0, my(A=g(n), B=fibonacci(A)); n-=B; if(B>n, break)); n; }
    a(n) = if(n>0, my(A=g(n), B=fibonacci(A+1), C=n-B, D=d(C), E=g(C-1)); n + if(C>0, a(D) - D - fibonacci(E) + if(E%2==A%2, fibonacci(A-2))))

Formula

a(n) = n + [e(n) > 0]*(a(h(n)) - h(n) - f(s(n)) + [s(n) mod 2 = g(n) mod 2]*f(g(n) - 2)) for n > 0 with a(0) = 0 where s(n) = g(e(n) - 1) (here we also consider that g(0) = 0), h(n) = d(e(n)), e(n) = n - f(g(n) + 1) for n > 0 with e(0) = 0, d(n) = c(b(n)), b(n) = f(g(n) + 2) - n - 1 for n > 0 with b(0) = 0, c(n) = f(g(n) + 3) - n - 1 for n > 0 with c(0) = 0, f(n) = A000045(n) and where g(n) = A072649(n).

A371163 Numbers that remain unchanged when converted to their compressed fibbinary numbers.

Original entry on oeis.org

0, 1, 2, 9, 10, 115544, 13568075, 13568077, 13568078, 13568083, 13568085, 13568086
Offset: 1

Views

Author

Douglas Boffey, Mar 13 2024

Keywords

Examples

			9 is a term since 9 = 8 + 1 = F(6) + F(2), where F(i) is the i-th Fibonacci number, is Fibbinary A003714(9) = 10001_2, but then all '01's are compressed to '1', leaving A048679(9) = 1001_2, which is 9 itself again.
		

Crossrefs

Fixed points of A048679 and A048680.

Programs

  • Python
    from itertools import count, islice
    def A371163_gen(): # generator of terms
        c = 0
        for n in count(0):
            if not (n<<1)&n:
                if  int(bin(n)[2:].replace('01','1'),2) == c:
                    yield c
                c += 1
    A371163_list = list(islice(A371163_gen(),6)) # Chai Wah Wu, Mar 18 2024
Previous Showing 21-27 of 27 results.