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 31-40 of 57 results. Next

A297783 Number of distinct runs in base-15 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Clark Kimberling, Feb 03 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.
Starts to differ from A043542 at n=3391. - R. J. Mathar, Jul 24 2023

Examples

			12153600 in base-15: 1,1,0,1,1,0,0; four runs, of which 3 are distinct, so that a(12153600) = 3.
		

Crossrefs

Cf. A043567 (number of runs, not necessarily distinct), A297770.

Programs

  • Mathematica
    b = 15; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]

A351205 Numbers whose binary expansion does not have all distinct runs.

Original entry on oeis.org

5, 9, 10, 17, 18, 20, 21, 22, 26, 27, 33, 34, 36, 37, 40, 41, 42, 43, 45, 46, 51, 53, 54, 58, 65, 66, 68, 69, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 93, 94, 99, 100, 101, 102, 105, 106, 107, 108, 109, 110, 117, 118, 119, 122, 129
Offset: 1

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Examples

			The terms together with their binary expansions begin:
      5:     101     41:  101001     74: 1001010
      9:    1001     42:  101010     75: 1001011
     10:    1010     43:  101011     76: 1001100
     17:   10001     45:  101101     77: 1001101
     18:   10010     46:  101110     80: 1010000
     20:   10100     51:  110011     81: 1010001
     21:   10101     53:  110101     82: 1010010
     22:   10110     54:  110110     83: 1010011
     26:   11010     58:  111010     84: 1010100
     27:   11011     65: 1000001     85: 1010101
     33:  100001     66: 1000010     86: 1010110
     34:  100010     68: 1000100     87: 1010111
     36:  100100     69: 1000101     89: 1011001
     37:  100101     72: 1001000     90: 1011010
     40:  101000     73: 1001001     91: 1011011
For example, 77 has binary expansion 1001101, with runs 1, 00, 11, 0, 1, which are not all distinct, so 77 is in the sequence.
		

Crossrefs

Runs in binary expansion are counted by A005811, distinct A297770.
The complement is A175413, for run-lengths A044813.
The version for standard compositions is A351291, complement A351290.
A000120 counts binary weight.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A325545 counts compositions with distinct differences.
A333489 ranks anti-runs, complement A348612, counted by A003242.
A334028 counts distinct parts in standard compositions.
A351014 counts distinct runs in standard compositions.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020.
- A351200 = patterns, for run-lengths A351292.
- A351202 = permutations of prime factors.

Programs

  • Maple
    q:= proc(n) uses ListTools; (l-> is(nops(l)<>add(
          nops(i), i={Split(`=`, l, 1)}) +add(
          nops(i), i={Split(`=`, l, 0)})))(Bits[Split](n))
        end:
    select(q, [$1..200])[];  # Alois P. Heinz, Mar 14 2022
  • Mathematica
    Select[Range[0,100],!UnsameQ@@Split[IntegerDigits[#,2]]&]
  • Python
    from itertools import groupby, product
    def ok(n):
        runs = [(k, len(list(g))) for k, g in groupby(bin(n)[2:])]
        return len(runs) > len(set(runs))
    print([k for k in range(130) if ok(k)]) # Michael S. Branicky, Feb 09 2022

A043568 Number of runs in base-16 representation of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2
Offset: 0

Views

Author

Keywords

Comments

Differs from A043543 if we consider for example numbers which are palindromic in base 16 with 3 (2 distinct) digits. - R. J. Mathar, Oct 20 2008
Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences. - Clark Kimberling, Feb 04 2018

Crossrefs

Cf. A297783 (number of distinct runs), A297770.

Programs

  • Mathematica
    b = 16; s[n_] := Length[Split[IntegerDigits[n, b]]];
    Table[s[n], {n, 0, 200}]

A297771 Number of distinct runs in base-3 digits of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 1, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 2, 1, 2, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 2, 1, 2, 2, 3, 3, 3, 3, 4, 3, 3, 3, 2
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			1040 in base-3: 1,1,0,2,1,1,2; five runs, of which 3 are distinct, so that a(1040) = 3.
		

Crossrefs

Cf. A043555 (number of runs, not necessarily distinct), A297770 (this for base 2).

Programs

  • Mathematica
    b = 3; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]
  • PARI
    apply( {A297771(n)=my(r=Vec(0, 3), c); while(n, my(d=n%3, L=valuation(n+if(d>1, 1, d, n+1), 3)); !bittest(r[1+d], L) && c++ && r[1+d] += 1<M. F. Hasler, Jul 13 2024
  • Python
    from itertools import groupby
    from sympy.ntheory import digits
    def A297771(n): return len(set(map(lambda x:tuple(x[1]),groupby(digits(n,3)[1:])))) # Chai Wah Wu, Jul 13 2024
    

Formula

a(n) << log n. In particular, a(n) <= log(n)/log(3) + 1. - Charles R Greathouse IV, Jul 13 2024

A297772 Number of distinct runs in base-4 digits of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 3, 3, 2, 1, 2, 2, 3, 2, 2, 3, 3, 2, 3, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 2, 1, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 2, 3, 2, 3, 3, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 4, 3, 2, 3, 3, 3, 2, 1, 2
Offset: 1

Views

Author

Clark Kimberling, Jan 27 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			123456 in base-4: 1,3,2,0,2,1,0,0,0; seven runs, of which 5 are distinct, so that a(123456) = 5.
		

Crossrefs

Cf. A043556 (number of runs, not necessarily distinct), A297770 (distinct runs in base 2).

Programs

  • Mathematica
    b = 4; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]
  • PARI
    apply( {A297772(n)=my(r=Vec(0, 4), c); while(n, my(d=bitand(n,3),  L=valuation(n+if(d==3, 1, d==2, n\2+1, d, n<<1+1), if(d==2, 2, 4))); d==2 && L\/=2; !bittest(r[1+d], L) && c++ && r[1+d] += 1<>=2*L); c}, [0..99]) \\ M. F. Hasler, Jul 15 2024
  • Python
    from itertools import groupby
    from sympy.ntheory import digits
    def A297772(n): return len(set(map(lambda x:tuple(x[1]),groupby(sympydigits(n,4)[1:])))) # Chai Wah Wu, Jul 13 2024
    

A297773 Number of distinct runs in base-5 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 3, 2, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 1, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 2, 3, 3, 3
Offset: 1

Views

Author

Clark Kimberling, Jan 27 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			8^8 in base 5: 1,3,2,4,3,3,3,2,3,3,1; eight runs, of which 6 are distinct, so that a(8^8) = 6.
		

Crossrefs

Cf. A043557 (number of runs, not necessarily distinct), A297770, A043532.

Programs

  • Mathematica
    b = 5; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]

A297774 Number of distinct runs in base-6 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3, 3, 2, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 2, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Jan 27 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			9^9 in base-6: 1,0,2,2,3,5,4,3,3,2,1,3; ten runs, of which 8 are distinct, so that a(9^9) = 8.
		

Crossrefs

Cf. A043558 (number of runs, not necessarily distinct), A297770.

Programs

  • Mathematica
    b = 6; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]

A297775 Number of distinct runs in base-7 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 2, 3
Offset: 1

Views

Author

Clark Kimberling, Jan 27 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			1234567 in base-7: 1,3,3,3,1,2,1,5; six runs, of which 4 are distinct, so that a(1234567) = 4.
		

Crossrefs

Cf. A043559 (number of runs, not necessarily distinct), A297770, A043534.

Programs

  • Mathematica
    b = 7; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]

A297776 Number of distinct runs in base-8 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3
Offset: 1

Views

Author

Clark Kimberling, Jan 29 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			1262656 in base-8: 1,0,0,1,0,0,1; five runs, of which 2 are distinct, so that a(1262656) = 2.
		

Crossrefs

Cf. A043560 (number of runs, not necessarily distinct), A297770, A043535.

Programs

  • Mathematica
    b = 8; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]

A297777 Number of distinct runs in base-9 digits of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 3, 3
Offset: 1

Views

Author

Clark Kimberling, Jan 29 2018

Keywords

Comments

Every positive integers occurs infinitely many times. See A297770 for a guide to related sequences.

Examples

			6643 in base-9: 1,0,1,0,1; five runs, of which 2 are distinct, so that a(6643) = 2.
		

Crossrefs

Cf. A043561 (number of runs, not necessarily distinct), A297770.

Programs

  • Mathematica
    b = 9; s[n_] := Length[Union[Split[IntegerDigits[n, b]]]]
    Table[s[n], {n, 1, 200}]
Previous Showing 31-40 of 57 results. Next