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 11-13 of 13 results.

A385887 The number k such that the k-th composition in standard order is the reversed sequence of lengths of maximal runs of binary indices of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 2, 4, 1, 3, 3, 6, 2, 5, 4, 8, 1, 3, 3, 6, 3, 7, 6, 12, 2, 5, 5, 10, 4, 9, 8, 16, 1, 3, 3, 6, 3, 7, 6, 12, 3, 7, 7, 14, 6, 13, 12, 24, 2, 5, 5, 10, 5, 11, 10, 20, 4, 9, 9, 18, 8, 17, 16, 32, 1, 3, 3, 6, 3, 7, 6, 12, 3, 7, 7, 14, 6, 13, 12, 24
Offset: 0

Views

Author

Gus Wiseman, Jul 17 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The binary indices of 100 are {3,6,7}, with maximal runs ((3),(6,7)), with reversed lengths (2,1), which is the 5th composition in standard order, so a(100) = 5.
		

Crossrefs

Removing duplicates appears to give A232559, see also A348366, A358654, A385818.
Sorted positions of firsts appearances appear to be A247648+1.
The non-reverse version is A385889.
A245563 lists run-lengths of binary indices (ranks A246029), reverse A245562.
A384877 lists anti-run lengths of binary indices (ranks A385816), reverse A209859.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[Reverse[Length/@Split[bpe[n],#2==#1+1&]]],{n,0,100}]

A344960 Positions in A344953 of the binary complement of the n-th word in A344953.

Original entry on oeis.org

2, 1, 7, 5, 4, 20, 3, 15, 13, 12, 54, 10, 9, 41, 8, 36, 34, 33, 143, 6, 28, 26, 25, 109, 23, 22, 96, 21, 91, 89, 88, 376, 18, 17, 75, 16, 70, 68, 67, 287, 14, 62, 60, 59, 253, 57, 56, 240, 55, 235, 233, 232, 986, 11, 49, 47, 46, 198, 44, 43, 185, 42, 180
Offset: 1

Views

Author

Clark Kimberling, Jul 10 2021

Keywords

Comments

A permutation of the positive integers.

Examples

			The first twenty words w(n):  0, 1, 00, 01, 10, 000, 11, 001, 010, 100, 0000, 011, 101, 0001, 110, 0010, 0100, 1000, 00000, 111; the binary complement of 00 is 11, so a(3) = 7.
		

Crossrefs

Programs

Formula

Conjecture: a(n) = A345253(A348366(n+1))-1 (noticed by Sequence Machine). - Mikhail Kurkov, Nov 28 2024

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).
Previous Showing 11-13 of 13 results.