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

A257739 Numbers n for which A256999(n) > n; numbers that can be made larger by rotating (by one or more steps) the non-msb bits of their binary representation (with A080541 or A080542).

Original entry on oeis.org

5, 9, 10, 11, 13, 17, 18, 19, 20, 21, 22, 23, 25, 27, 29, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 59, 61, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111
Offset: 1

Views

Author

Antti Karttunen, May 18 2015

Keywords

Comments

Note that A256999(a(n)) is always in A257250.
If we define a co-necklace to be a finite sequence that is lexicographically maximal (not minimal) among all of its cyclic rotations, these are numbers whose binary expansion, without the most significant digit, is not a co-necklace. Numbers whose binary expansion, without the most significant digit, is not a necklace are A329367. - Gus Wiseman, Nov 14 2019

Examples

			For n = 5 with binary representation "101" if we rotate other bits than the most significant bit (that is, only the two rightmost digits "01") one step to either direction we get "110" = 6 > 5, so 5 can be made larger by such rotations and thus 5 is included in this sequence.
For n = 6 with binary representation "110" no such rotation will yield a larger number and thus 6 is NOT included in this sequence.
For n = 10 with binary representation "1010" if we rotate other bits than the most significant bit (that is, only the three rightmost digits "010") either one step to the left or two steps to the right we get "1100" = 12 > 10, thus 10 is included in this sequence.
		

Crossrefs

Complement: A257250.
Numbers whose binary expansion is a necklace are A275692.
Numbers whose binary expansion is a co-necklace are A065609.
Numbers whose reversed binary expansion is a necklace are A328595.
Numbers whose non-msb expansion is a co-necklace are A257250.
Numbers whose non-msb expansion is a necklace are A328668.
Numbers whose reversed non-msb expansion is a necklace are A328607.
Numbers whose non-msb expansion is not a necklace are A329367.
Binary necklaces are A000031.
Necklace compositions are A008965.

Programs

  • Mathematica
    reckQ[q_]:=Array[OrderedQ[{RotateRight[q,#],q}]&,Length[q]-1,1,And];
    Select[Range[2,100],!reckQ[Rest[IntegerDigits[#,2]]]&] (* Gus Wiseman, Nov 14 2019 *)

A328870 Numbers whose lengths of runs of 1's in their reversed binary expansion are not weakly increasing.

Original entry on oeis.org

11, 19, 22, 23, 35, 38, 39, 43, 44, 45, 46, 47, 55, 67, 70, 71, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 103, 107, 110, 111, 131, 134, 135, 139, 140, 141, 142, 143, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 163, 166, 167
Offset: 1

Views

Author

Gus Wiseman, Nov 12 2019

Keywords

Examples

			The sequence of terms together with their reversed binary expansions begins:
  11: (1101)
  19: (11001)
  22: (01101)
  23: (11101)
  35: (110001)
  38: (011001)
  39: (111001)
  43: (110101)
  44: (001101)
  45: (101101)
  46: (011101)
  47: (111101)
  55: (111011)
  67: (1100001)
  70: (0110001)
  71: (1110001)
  75: (1101001)
  76: (0011001)
  77: (1011001)
  78: (0111001)
		

Crossrefs

Complement of A328869.
The version for prime indices is A112769.
The binary expansion of n has A069010(n) runs of 1's.

Programs

  • Mathematica
    Select[Range[100],!LessEqual@@Length/@Split[Join@@Position[Reverse[IntegerDigits[#,2]],1],#2==#1+1&]&]

A164713 A positive integer n is included if all runs of 0's in binary n are of the same length, and if all runs of 1's in binary n are of the same length.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 21, 24, 27, 28, 30, 31, 32, 33, 36, 42, 48, 51, 54, 56, 60, 62, 63, 64, 65, 73, 85, 96, 99, 112, 119, 120, 124, 126, 127, 128, 129, 136, 170, 192, 195, 204, 219, 224, 231, 238, 240, 248, 252, 254, 255, 256, 257, 273
Offset: 1

Views

Author

Leroy Quet, Aug 23 2009

Keywords

Comments

Clarification: A binary number consists of "runs" completely of 1's alternating with runs completely of 0's. No two or more runs all of the same digit are adjacent.
The length of each run of 1's may be different that the length of each run of 0's.
This sequence contains those positive integers in both sequence A164707 and sequence A164710.
For those integers in this sequence that each have at least two runs of 0's and at least two runs of 1's, see sequence A164714.

Crossrefs

Extensions

More terms from Sean A. Irvine, Sep 28 2009

A328869 Numbers whose lengths of runs of 1's in their reversed binary expansion are weakly increasing.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 40, 41, 42, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 72, 73, 74, 80, 81, 82, 84, 85, 96, 97, 98, 99
Offset: 1

Views

Author

Gus Wiseman, Nov 12 2019

Keywords

Examples

			The sequence of terms together with their reversed binary expansions begins:
   1: (1)
   2: (01)
   3: (11)
   4: (001)
   5: (101)
   6: (011)
   7: (111)
   8: (0001)
   9: (1001)
  10: (0101)
  12: (0011)
  13: (1011)
  14: (0111)
  15: (1111)
  16: (00001)
  17: (10001)
  18: (01001)
  20: (00101)
  21: (10101)
  24: (00011)
		

Crossrefs

Complement of A328870.
The version for prime indices is A304678.
The binary expansion of n has A069010(n) runs of 1's.

Programs

  • Mathematica
    Select[Range[100],LessEqual@@Length/@Split[Join@@Position[Reverse[IntegerDigits[#,2]],1],#2==#1+1&]&]

A330029 Numbers whose binary expansion has cuts-resistance <= 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 25, 26, 37, 38, 41, 42, 43, 44, 45, 50, 51, 52, 53, 74, 75, 76, 77, 82, 83, 84, 85, 86, 89, 90, 101, 102, 105, 106, 149, 150, 153, 154, 165, 166, 169, 170, 171, 172, 173, 178, 179, 180, 181, 202, 203
Offset: 1

Views

Author

Gus Wiseman, Nov 27 2019

Keywords

Comments

For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.
Also numbers whose binary expansion is a balanced word (see A027383 for definition).
Also numbers whose binary expansion has all run-lengths 1 or 2 and whose sequence of run-lengths has no odd-length run of 1's sandwiched between two 2's.

Examples

			The sequence of terms together with their binary expansions begins:
    0:
    1:        1
    2:       10
    3:       11
    4:      100
    5:      101
    6:      110
    9:     1001
   10:     1010
   11:     1011
   12:     1100
   13:     1101
   18:    10010
   19:    10011
   20:    10100
   21:    10101
   22:    10110
   25:    11001
   26:    11010
   37:   100101
   38:   100110
		

Crossrefs

Union of A000975 and A329862.
Balanced binary words are counted by A027383.
Compositions with cuts-resistance <= 2 are A330028.
Cuts-resistance of binary expansion is A319416.

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Select[Range[0,100],degdep[IntegerDigits[#,2]]<=2&]

A385214 Number of subsets of {1..n} without all equal lengths of maximal runs of consecutive elements increasing by 1.

Original entry on oeis.org

0, 0, 0, 0, 2, 8, 25, 66, 159, 361, 791, 1688, 3539, 7328, 15040, 30669, 62246, 125896, 253975, 511357, 1028052
Offset: 0

Views

Author

Gus Wiseman, Jun 25 2025

Keywords

Examples

			The maximal runs of S = {1,2,4,5,6,8,9} are ((1,2),(4,5,6),(8,9)), with lengths (2,3,2), so S is counted under a(9).
The a(0) = 0 through a(5) = 8 subsets:
  .  .  .  .  {1,2,4}  {1,2,4}
              {1,3,4}  {1,2,5}
                       {1,3,4}
                       {1,4,5}
                       {2,3,5}
                       {2,4,5}
                       {1,2,3,5}
                       {1,3,4,5}
		

Crossrefs

These subsets are ranked by A164708, complement A164707
The complement is counted by A243815.
For distinct instead of equal lengths we have A384176, complement A384175.
For anti-runs instead of runs we have complement of A384889, for partitions A384888.
For permutations instead of subsets we have complement of A384892, distinct A384891.
For partitions instead of subsets we have complement of A384904, strict A384886.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A049988 counts partitions with equal run-lengths, distinct A325325.
A329738 counts compositions with equal run-lengths, distinct A329739.
A384177 counts subsets with all distinct lengths of maximal anti-runs, ranks A384879.
A384887 counts partitions with equal lengths of gapless runs, distinct A384884.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!SameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]

A385892 In the sequence of run lengths of binary indices of each positive integer (A245563), remove all duplicate rows after the first and take the last term of each remaining row.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 4, 1, 1, 2, 3, 5, 1, 1, 1, 2, 2, 3, 4, 6, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 7
Offset: 1

Views

Author

Gus Wiseman, Jul 18 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.

Examples

			The binary indices of 53 are {1,3,5,6}, with maximal runs ((1),(3),(5,6)), with lengths (1,1,2), which is the 16th row of A385817, so a(16) = 2.
		

Crossrefs

In the following references, "before" is short for "before removing duplicate rows".
Positions of firsts appearances appear to be A000071.
Without the removals we have A090996.
For sum instead of last we have A200648, before A000120.
For length instead of last we have A200650+1, before A069010 = A037800+1.
Last term of row n of A385817 (ranks A385818, before A385889), first A083368.
A245563 gives run lengths of binary indices, see A245562, A246029, A328592.
A384877 gives anti-run lengths of binary indices, A385816.

Programs

  • Mathematica
    Last/@DeleteDuplicates[Table[Length/@Split[Join@@Position[Reverse[IntegerDigits[n,2]],1],#2==#1+1&],{n,100}]]
Previous Showing 31-37 of 37 results.