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-20 of 109 results. Next

A089633 Numbers having no more than one 0 in their binary representation.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 11, 13, 14, 15, 23, 27, 29, 30, 31, 47, 55, 59, 61, 62, 63, 95, 111, 119, 123, 125, 126, 127, 191, 223, 239, 247, 251, 253, 254, 255, 383, 447, 479, 495, 503, 507, 509, 510, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1023
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 01 2004

Keywords

Comments

Complement of A158582. - Reinhard Zumkeller, Apr 16 2009
Also union of A168604 and A030130. - Douglas Latimer, Jul 19 2012
Numbers of the form 2^t - 2^k - 1, 0 <= k < t.
n is in the sequence if and only if 2*n+1 is in the sequence. - Robert Israel, Dec 14 2018
Also the least binary rank of a strict integer partition of n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). - Gus Wiseman, May 24 2024

Examples

			From _Tilman Piesk_, May 09 2012: (Start)
This may also be viewed as a triangle:             In binary:
                  0                                         0
               1     2                                 01       10
             3    5    6                          011      101      110
           7   11   13   14                  0111     1011     1101     1110
        15   23   27   29   30          01111    10111    11011    11101    11110
      31  47   55   59   61   62
   63   95  111  119  123  125  126
Left three diagonals are A000225,  A055010, A086224. Right diagonal is A000918. Central column is A129868. Numbers in row n (counted from 0) have n binary 1s. (End)
From _Gus Wiseman_, May 24 2024: (Start)
The terms together with their binary expansions and binary indices begin:
   0:      0 ~ {}
   1:      1 ~ {1}
   2:     10 ~ {2}
   3:     11 ~ {1,2}
   5:    101 ~ {1,3}
   6:    110 ~ {2,3}
   7:    111 ~ {1,2,3}
  11:   1011 ~ {1,2,4}
  13:   1101 ~ {1,3,4}
  14:   1110 ~ {2,3,4}
  15:   1111 ~ {1,2,3,4}
  23:  10111 ~ {1,2,3,5}
  27:  11011 ~ {1,2,4,5}
  29:  11101 ~ {1,3,4,5}
  30:  11110 ~ {2,3,4,5}
  31:  11111 ~ {1,2,3,4,5}
  47: 101111 ~ {1,2,3,4,6}
  55: 110111 ~ {1,2,3,5,6}
  59: 111011 ~ {1,2,4,5,6}
  61: 111101 ~ {1,3,4,5,6}
  62: 111110 ~ {2,3,4,5,6}
(End)
		

Crossrefs

Cf. A181741 (primes), union of A081118 and A000918, apart from initial -1.
For least binary index (instead of rank) we have A001511.
Applying A019565 (Heinz number of binary indices) gives A077011.
For greatest binary index we have A029837 or A070939, opposite A070940.
Row minima of A118462 (binary ranks of strict partitions).
For sum instead of minimum we have A372888, non-strict A372890.
A000009 counts strict partitions, ranks A005117.
A048675 gives binary rank of prime indices, distinct A087207.
A048793 lists binary indices, product A096111, reverse A272020.
A277905 groups all positive integers by binary rank of prime indices.

Programs

  • Haskell
    a089633 n = a089633_list !! (n-1)
    a089633_list = [2 ^ t - 2 ^ k - 1 | t <- [1..], k <- [t-1,t-2..0]]
    -- Reinhard Zumkeller, Feb 23 2012
    
  • Maple
    seq(seq(2^a-1-2^b,b=a-1..0,-1),a=1..11); # Robert Israel, Dec 14 2018
  • Mathematica
    fQ[n_] := DigitCount[n, 2, 0] < 2; Select[ Range[0, 2^10], fQ] (* Robert G. Wilson v, Aug 02 2012 *)
  • PARI
    {insq(n) = local(dd, hf, v); v=binary(n);hf=length(v);dd=sum(i=1,hf,v[i]);if(dd<=hf-2,-1,1)}
    {for(w=0,1536,if(insq(w)>=0,print1(w,", ")))}
    \\ Douglas Latimer, May 07 2013
    
  • PARI
    isoka(n) = #select(x->(x==0), binary(n)) <= 1; \\ Michel Marcus, Dec 14 2018
    
  • Python
    from itertools import count, islice
    def A089633_gen(): # generator of terms
        return ((1<A089633_list = list(islice(A089633_gen(),30)) # Chai Wah Wu, Feb 10 2023
    
  • Python
    from math import isqrt, comb
    def A089633(n): return (1<<(a:=(isqrt((n<<3)+1)-1>>1)+1))-(1<Chai Wah Wu, Dec 19 2024

Formula

A023416(a(n)) <= 1; A023416(a(n)) = A023532(n-2) for n>1;
A000120(a(u)) <= A000120(a(v)) for uA000120(a(n)) = A003056(n).
a(0)=0, n>0: a(n+1) = Min{m>n: BinOnes(a(n))<=BinOnes(m)} with BinOnes=A000120.
If m = floor((sqrt(8*n+1) - 1) / 2), then a(n) = 2^(m+1) - 2^(m*(m+3)/2 - n) - 1. - Carl R. White, Feb 10 2009
A029931(a(n)) = n and A029931(m) != n for m < a(n). - Reinhard Zumkeller, Feb 28 2014
A265705(a(n),k) = A265705(a(n),a(n)-k), k = 0 .. a(n). - Reinhard Zumkeller, Dec 15 2015
a(A014132(n)-1) = 2*a(n-1)+1 for n >= 1. - Robert Israel, Dec 14 2018
Sum_{n>=1} 1/a(n) = A065442 + A160502 = 3.069285887459... . - Amiram Eldar, Jan 09 2024
A019565(a(n)) = A077011(n). - Gus Wiseman, May 24 2024

A372429 Sum of binary indices of prime(n). Sum of positions of ones in the reversed binary expansion of prime(n).

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 6, 8, 11, 13, 15, 10, 11, 13, 16, 15, 18, 19, 10, 13, 12, 17, 15, 17, 14, 17, 19, 20, 21, 19, 28, 11, 13, 15, 17, 19, 21, 17, 20, 22, 22, 23, 29, 16, 19, 21, 23, 30, 24, 25, 26, 31, 27, 33, 10, 15, 17, 19, 18, 19, 21, 19, 23, 26, 25, 28, 23
Offset: 1

Views

Author

Gus Wiseman, May 02 2024

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.
Do 2, 3, 4, 7, 12, 14 appear just once?
Are 1, 5, 9 missing?
The above questions hold true up to n = 10^6. - John Tyler Rascoe, May 21 2024

Examples

			The primes together with their binary expansions and binary indices begin:
   2:      10 ~ {2}
   3:      11 ~ {1,2}
   5:     101 ~ {1,3}
   7:     111 ~ {1,2,3}
  11:    1011 ~ {1,2,4}
  13:    1101 ~ {1,3,4}
  17:   10001 ~ {1,5}
  19:   10011 ~ {1,2,5}
  23:   10111 ~ {1,2,3,5}
  29:   11101 ~ {1,3,4,5}
  31:   11111 ~ {1,2,3,4,5}
  37:  100101 ~ {1,3,6}
  41:  101001 ~ {1,4,6}
  43:  101011 ~ {1,2,4,6}
  47:  101111 ~ {1,2,3,4,6}
  53:  110101 ~ {1,3,5,6}
  59:  111011 ~ {1,2,4,5,6}
  61:  111101 ~ {1,3,4,5,6}
  67: 1000011 ~ {1,2,7}
  71: 1000111 ~ {1,2,3,7}
  73: 1001001 ~ {1,4,7}
  79: 1001111 ~ {1,2,3,4,7}
		

Crossrefs

The number instead of sum of binary indices is A014499.
Restriction of A029931 (sum of binary indices) to the primes A000040.
The maximum instead of sum of binary indices is A035100, see also A023506.
Row-sums of A372471.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020.
A056239 adds up prime indices.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A326031 gives weight of the set-system with BII-number n.
A372427 lists numbers whose binary and prime indices have the same sum.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Total[bix[Prime[n]]],{n,100}]

Formula

a(n) = A029931(prime(n)).

A333628 Runs-resistance of the n-th composition in standard order. Number of steps taking run-lengths to reduce the n-th composition in standard order to a singleton.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 31 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of 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.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

Examples

			Starting with 13789 and repeatedly applying A333627 gives: 13789 -> 859 -> 110 -> 29 -> 11 -> 6 -> 3 -> 2, corresponding to the compositions: (1,2,2,1,1,2,1,1,2,1) -> (1,2,2,1,2,1,1) -> (1,2,1,1,2) -> (1,1,2,1) -> (2,1,1) -> (1,2) -> (1,1) -> (2), so a(13789) = 7.
		

Crossrefs

Number of times applying A333627 to reach a power of 2, starting with n.
Positions of first appearances are A333629.
All of the following pertain to compositions in standard order (A066099):
- The length is A000120.
- The partial sums from the right are A048793.
- The sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Equal runs are counted by A124767.
- Strict compositions are ranked by A233564.
- The partial sums from the left are A272020.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- First appearances for specified run-lengths are A333630.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[runsres[stc[n]],{n,100}]

A367908 Numbers n such that there is only one way to choose a different binary index of each binary index of n.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 10, 11, 13, 14, 17, 19, 21, 22, 24, 26, 28, 34, 35, 37, 38, 40, 41, 44, 49, 50, 56, 67, 69, 70, 73, 74, 81, 88, 98, 104, 128, 129, 130, 131, 133, 134, 136, 137, 138, 139, 141, 142, 145, 147, 149, 150, 152, 154, 156, 162, 163, 165, 166, 168
Offset: 1

Views

Author

Gus Wiseman, Dec 11 2023

Keywords

Comments

Also BII-numbers of set-systems (sets of nonempty sets) satisfying a strict version of the axiom of choice in exactly one way.
A binary index of n (row n of A048793) is any position of a 1 in its reversed binary expansion. A set-system is a finite set of finite nonempty sets. We define the set-system with BII-number n to be obtained by taking the binary indices of each binary index of n. Every finite set of finite nonempty sets has a different BII-number. For example, 18 has reversed binary digits (0,1,0,0,1), and since the binary indices of 2 and 5 are {2} and {1,3} respectively, the BII-number of {{2},{1,3}} is 18.
The axiom of choice says that, given any set of nonempty sets Y, it is possible to choose a set containing an element from each. The strict version requires this set to have the same cardinality as Y, meaning no element is chosen more than once.

Examples

			The set-system {{1},{1,2},{1,3}} with BII-number 21 satisfies the axiom in exactly one way, namely (1,2,3), so 21 is in the sequence.
The terms together with the corresponding set-systems begin:
   1: {{1}}
   2: {{2}}
   3: {{1},{2}}
   5: {{1},{1,2}}
   6: {{2},{1,2}}
   8: {{3}}
   9: {{1},{3}}
  10: {{2},{3}}
  11: {{1},{2},{3}}
  13: {{1},{1,2},{3}}
  14: {{2},{1,2},{3}}
  17: {{1},{1,3}}
  19: {{1},{2},{1,3}}
  21: {{1},{1,2},{1,3}}
  22: {{2},{1,2},{1,3}}
		

Crossrefs

These set-systems are counted by A367904.
Positions of 1's in A367905, firsts A367910, sorted firsts A367911.
If there is at least one choice we get A367906, counted by A367902.
If there are no choices we get A367907, counted by A367903.
If there are multiple choices we get A367909, counted by A367772.
The version for MM-numbers of multiset partitions is A368101.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A058891 counts set-systems, covering A003465, connected A323818.
A059201 counts covering T_0 set-systems.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A326031 gives weight of the set-system with BII-number n.
A368098 counts unlabeled multiset partitions for axiom, complement A368097.
BII-numbers: A309314 (hyperforests), A326701 (set partitions), A326703 (chains), A326704 (antichains), A326749 (connected), A326750 (clutters), A326751 (blobs), A326752 (hypertrees), A326754 (covers), A326783 (uniform), A326784 (regular), A326788 (simple), A330217 (achiral).

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100], Length[Select[Tuples[bpe/@bpe[#]], UnsameQ@@#&]]==1&]
  • Python
    from itertools import count, islice, product
    def bin_i(n): #binary indices
        return([(i+1) for i, x in enumerate(bin(n)[2:][::-1]) if x =='1'])
    def a_gen(): #generator of terms
        for n in count(1):
            p = list(product(*[bin_i(k) for k in bin_i(n)]))
            x,c = len(p),0
            for j in range(x):
                if len(set(p[j])) == len(p[j]): c += 1
                if j+1 == x and c == 1: yield(n)
    A367908_list = list(islice(a_gen(), 100)) # John Tyler Rascoe, Feb 10 2024

Formula

A233249 a(1)=0; for k >= 1, let prime(k) map to 10...0 with k-1 zeros and let prime(k)*prime(m) map to the concatenation in binary of 2^(k-1) and 2^(m-1). For n >= 2, let the prime power factorization of n be mapped to r(n). a(n) is the term in A114994 which is c-equivalent to r(n) (see there our comment).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 10, 9, 16, 11, 32, 17, 18, 15, 64, 21, 128, 19, 34, 33, 256, 23, 36, 65, 42, 35, 512, 37, 1024, 31, 66, 129, 68, 43, 2048, 257, 130, 39, 4096, 69, 8192, 67, 74, 513, 16384, 47, 136, 73, 258, 131, 32768, 85, 132, 71, 514, 1025, 65536, 75
Offset: 1

Views

Author

Vladimir Shevelev, Dec 06 2013

Keywords

Comments

Let (10...0)_i (i>=0) denote 2^i in binary. Under (10...0)_i^k we understand a concatenation of (10...0)_i k times.
If n=Product_{i=1..m} p_i^t_i is the prime power factorization of n, then in the name r(n)=concatenation{i=1..m} ((10...0_(i-1)^t_i).
Numbers q and s are called c-equivalent if their binary expansions contain the same set of parts of the form 10...0. For example, 14=(1)(1)(10)~(10)(1)(1)=11.
Conversely, if n~n_1 such that n_1 is in A114994 and has c-factorization: n_1 = concatenation{i=m,...,0} ((10...0)i^t_i), one can consider "converse" sequence {s(n)}, where s(n) = Product{i=m..0} p_(i+1)^t_i.
For example, for n=22, n_1=21=((10)^2)(1), and s(22)=3^2*2=18.
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary binary expansion of k, prepending 0, taking first differences, and reversing again. Then a(n) is the number k such that the k-th composition in standard order consists of the prime indices of n in weakly decreasing order (the partition with Heinz number n). - Gus Wiseman, Apr 02 2020

Examples

			n=10=2*5 is mapped to (1)(100)~(100)(1). Since 9 is in A114994, then a(10)=9.
From _Gus Wiseman_, Apr 02 2020: (Start)
The sequence together with the corresponding compositions begins:
   0: ()             128: (8)             2048: (12)
   1: (1)             19: (3,1,1)          257: (8,1)
   2: (2)             34: (4,2)            130: (6,2)
   3: (1,1)           33: (5,1)             39: (3,1,1,1)
   4: (3)            256: (9)             4096: (13)
   5: (2,1)           23: (2,1,1,1)         69: (4,2,1)
   8: (4)             36: (3,3)           8192: (14)
   7: (1,1,1)         65: (6,1)             67: (5,1,1)
  10: (2,2)           42: (2,2,2)           74: (3,2,2)
   9: (3,1)           35: (4,1,1)          513: (9,1)
  16: (5)            512: (10)           16384: (15)
  11: (2,1,1)         37: (3,2,1)           47: (2,1,1,1,1)
  32: (6)           1024: (11)             136: (4,4)
  17: (4,1)           31: (1,1,1,1,1)       73: (3,3,1)
  18: (3,2)           66: (5,2)            258: (7,2)
  15: (1,1,1,1)      129: (7,1)            131: (6,1,1)
  64: (7)             68: (4,3)          32768: (16)
  21: (2,2,1)         43: (2,2,1,1)         85: (2,2,2,1)
For example, the Heinz number of (2,2,1) is 18, and the 21st composition in standard order is (2,2,1), so a(18) = 21.
(End)
		

Crossrefs

The sorted version is A114994.
The primorials A002110 map to A246534.
A partial inverse is A333219.
The reversed version is A333220.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[2^Accumulate[primeMS[n]]]/2,{n,100}] (* Gus Wiseman, Apr 02 2020 *)

Formula

A059893(a(n)) = A333220(n). A124767(a(n)) = A001221(n). - Gus Wiseman, Apr 02 2020

Extensions

More terms from Peter J. C. Moses, Dec 07 2013

A370636 Number of subsets of {1..n} such that it is possible to choose a different binary index of each element.

Original entry on oeis.org

1, 2, 4, 7, 14, 24, 39, 61, 122, 203, 315, 469, 676, 952, 1307, 1771, 3542, 5708, 8432, 11877, 16123, 21415, 27835, 35757, 45343, 57010, 70778, 87384, 106479, 129304, 155802, 187223, 374446, 588130, 835800, 1124981, 1456282, 1841361, 2281772, 2791896, 3367162
Offset: 0

Views

Author

Gus Wiseman, Mar 08 2024

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 a(0) = 1 through a(4) = 14 subsets:
  {}  {}   {}     {}     {}
      {1}  {1}    {1}    {1}
           {2}    {2}    {2}
           {1,2}  {3}    {3}
                  {1,2}  {4}
                  {1,3}  {1,2}
                  {2,3}  {1,3}
                         {1,4}
                         {2,3}
                         {2,4}
                         {3,4}
                         {1,2,4}
                         {1,3,4}
                         {2,3,4}
		

Crossrefs

Simple graphs of this type are counted by A133686, covering A367869.
Unlabeled graphs of this type are counted by A134964, complement A140637.
Simple graphs not of this type are counted by A367867, covering A367868.
Set systems of this type are counted by A367902, ranks A367906.
Set systems not of this type are counted by A367903, ranks A367907.
Set systems uniquely of this type are counted by A367904, ranks A367908.
Unlabeled multiset partitions of this type are A368098, complement A368097.
A version for MM-numbers of multisets is A368100, complement A355529.
Factorizations are counted by A368414/A370814, complement A368413/A370813.
For prime indices we have A370582, differences A370586.
The complement for prime indices is A370583, differences A370587.
The complement is A370637, differences A370589, without ones A370643.
The case of a unique choice is A370638, maxima A370640, differences A370641.
First differences are A370639.
The minimal case of the complement is A370642, without ones A370644.
A048793 lists binary indices, A000120 length, A272020 reverse, A029931 sum.
A058891 counts set-systems, A003465 covering, A323818 connected.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A326031 gives weight of the set-system with BII-number n.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[Select[Subsets[Range[n]], Select[Tuples[bpe/@#],UnsameQ@@#&]!={}&]],{n,0,10}]

Formula

a(2^n - 1) = A367902(n).
Partial sums of A370639.

Extensions

a(19)-a(40) from Alois P. Heinz, Mar 09 2024

A372441 Number of binary indices (binary weight) of n minus number of prime indices (bigomega) of n.

Original entry on oeis.org

1, 0, 1, -1, 1, 0, 2, -2, 0, 0, 2, -1, 2, 1, 2, -3, 1, -1, 2, -1, 1, 1, 3, -2, 1, 1, 1, 0, 3, 1, 4, -4, 0, 0, 1, -2, 2, 1, 2, -2, 2, 0, 3, 0, 1, 2, 4, -3, 1, 0, 2, 0, 3, 0, 3, -1, 2, 2, 4, 0, 4, 3, 3, -5, 0, -1, 2, -1, 1, 0, 3, -3, 2, 1, 1, 0, 2, 1, 4, -3, -1
Offset: 1

Views

Author

Gus Wiseman, May 07 2024

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.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Crossrefs

Positions of zeros are A071814.
For sum instead of length we have A372428, zeros A372427.
For minimum instead of length we have A372437, zeros {}.
For maximum instead of length we have A372442, zeros A372436.
Positions of odd terms are A372590, even A372591.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Maple
    f:= proc(n) convert(convert(n,base,2),`+`)-numtheory:-bigomega(n) end proc:
    map(f, [$1..100]); # Robert Israel, May 22 2024
  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[bix[n]]-Length[prix[n]],{n,100}]

Formula

a(n) = A000120(n) - A001222(n).

A209862 Permutation of nonnegative integers which maps A209642 into ascending order (A209641).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15, 16, 17, 18, 20, 24, 19, 21, 25, 22, 26, 28, 23, 27, 29, 30, 31, 32, 33, 34, 36, 40, 48, 35, 37, 41, 49, 38, 42, 50, 44, 52, 56, 39, 43, 51, 45, 53, 57, 46, 54, 58, 60, 47, 55, 59, 61, 62, 63, 64, 65, 66, 68, 72, 80, 96, 67, 69, 73, 81, 97, 70, 74, 82, 98, 76, 84, 100, 88, 104, 112, 71, 75, 83
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2012

Keywords

Comments

Conjecture: For all n, a(A054429(n)) = A054429(a(n)), i.e. A054429 acts as a homomorphism (automorphism) of the cyclic group generated by this permutation. This implies also a weaker conjecture given in A209860.
From Gus Wiseman, Aug 24 2021: (Start)
As a triangle with row lengths 2^n, T(n,k) for n > 0 appears (verified up to n = 2^15) to be the unique nonnegative integer whose binary indices are the k-th subset of {1..n} containing n. Here, a binary index of n (row n of A048793) is any position of a 1 in its reversed binary expansion, and sets are sorted first by length, then lexicographically. For example, the triangle begins:
1
2 3
4 5 6 7
8 9 10 12 11 13 14 15
16 17 18 20 24 19 21 25 22 26 28 23 27 29 30 31
Mathematica: Table[Total[2^(Append[#,n]-1)]&/@Subsets[Range[n-1]],{n,5}]
Row lengths are A000079 (shifted right). Also Column k = 1.
Row sums are A010036.
Using reverse-lexicographic order gives A059893.
Using lexicographic order gives A059894.
Taking binary indices to prime indices gives A339195 (or A019565).
The ordering of sets is A344084.
A version using Heinz numbers is A344085.
(End)

Examples

			From _Gus Wiseman_, Aug 24 2021: (Start)
The terms, their binary expansions, and their binary indices begin:
   0:      ~ {}
   1:    1 ~ {1}
   2:   10 ~ {2}
   3:   11 ~ {1,2}
   4:  100 ~ {3}
   5:  101 ~ {1,3}
   6:  110 ~ {2,3}
   7:  111 ~ {1,2,3}
   8: 1000 ~ {4}
   9: 1001 ~ {1,4}
  10: 1010 ~ {2,4}
  12: 1100 ~ {3,4}
  11: 1011 ~ {1,2,4}
  13: 1101 ~ {1,3,4}
  14: 1110 ~ {2,3,4}
  15: 1111 ~ {1,2,3,4}
(End)
		

Crossrefs

Formula

A125106 Enumeration of partitions by binary representation: each 1 is a part; the part size is 1 more than the number of 0's in the rest of the number.

Original entry on oeis.org

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

Views

Author

Alford Arnold, Dec 10 2006

Keywords

Comments

Another way to describe this: starting with the binary representation and a counter set at one, count the 0's from right to left. Write a term equal to the counter for each "1" encountered.
A101211 is a similar sequence, with A005811 elements per row which maps natural numbers to compositions (ordered partitions).
There are two ways to consider this as a table: taking each partition as a row, or taking the partitions generated by 2^(n-1) through 2^n-1 as a row.
Taking the n-th row as multiple partitions, it consists of those partitions with the first hook size (largest part plus number of parts minus 1) equal to n. The number of integers in this n-th row is A001792(n-1), and the row sum is A049611.
Taking each partition as a separate row, the row lengths are A000120, and the row sums are A161511.
Heinz numbers of the rows are A005940. - Gus Wiseman, Jan 17 2023

Examples

			Row 4:
1000 [4]
1001 [3,1]
1010 [3,2]
1011 [2,1,1]
1100 [3,3]
1101 [2,2,1]
1110 [2,2,2]
1111 [1,1,1,1]
		

Crossrefs

Each partition as row: A000120 (row widths), A161511 (row sums), A243499 (row products).
Lasts are A001511.
Firsts are A008687.

Programs

  • Maple
    b:= proc(n) local c, l, m; l:=[][]; m:= n; c:=1;
          while m>0 do if irem(m, 2, 'm')=0 then c:= c+1
             else l:= c, l fi
          od; l
        end:
    T:= n-> seq(b(i), i=2^(n-1)..2^n-1):
    seq(T(n), n=1..7);  # Alois P. Heinz, Sep 25 2015
  • Mathematica
    f[k_] := (bits = IntegerDigits[k, 2]; zerosCount = Reverse[ Accumulate[ 1-Reverse[bits] ] ] + 1; Select[ Transpose[ {bits, zerosCount} ], First[#] == 1 & ][[All, 2]]); row[n_] := Table[ f[k], {k, 2^(n-1), 2^n-1}]; Flatten[ Table[ row[n], {n, 1, 5}]] (* Jean-François Alcover, Jan 24 2012 *)
    scc[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Reverse[scc[n]-Range[Length[scc[n]]]+1],{n,0,20}] (* Gus Wiseman, Jan 17 2023 *)

Formula

Partition 2n is partition n with every part size increased by 1; partition 2n+1 is partition n with an additional part of size 1.
T(n,k) = A272020(n,k) - A000120(n) + k. - Gus Wiseman, Jan 17 2023

Extensions

Edited by Franklin T. Adams-Watters, Jun 11 2009

A370637 Number of subsets of {1..n} such that it is not possible to choose a different binary index of each element.

Original entry on oeis.org

0, 0, 0, 1, 2, 8, 25, 67, 134, 309, 709, 1579, 3420, 7240, 15077, 30997, 61994, 125364, 253712, 512411, 1032453, 2075737, 4166469, 8352851, 16731873, 33497422, 67038086, 134130344, 268328977, 536741608, 1073586022, 2147296425, 4294592850, 8589346462, 17179033384
Offset: 0

Views

Author

Gus Wiseman, Mar 08 2024

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 a(0) = 0 through a(5) = 8 subsets:
  .  .  .  {1,2,3}  {1,2,3}    {1,2,3}
                    {1,2,3,4}  {1,4,5}
                               {1,2,3,4}
                               {1,2,3,5}
                               {1,2,4,5}
                               {1,3,4,5}
                               {2,3,4,5}
                               {1,2,3,4,5}
		

Crossrefs

Simple graphs not of this type are counted by A133686, covering A367869.
Unlabeled graphs of this type are counted by A140637, complement A134964.
Simple graphs of this type are counted by A367867, covering A367868.
Set systems not of this type are counted by A367902, ranks A367906.
Set systems of this type are counted by A367903, ranks A367907.
Set systems uniquely not of this type are counted by A367904, ranks A367908.
Unlabeled multiset partitions of this type are A368097, complement A368098.
A version for MM-numbers of multisets is A355529, complement A368100.
Factorizations are counted by A368413/A370813, complement A368414/A370814.
The complement for prime indices is A370582, differences A370586.
For prime indices we have A370583, differences A370587.
First differences are A370589.
The complement is counted by A370636, differences A370639.
The case without ones is A370643.
The version for a unique choice is A370638, maxima A370640, diffs A370641.
The minimal case is A370642, without ones A370644.
A048793 lists binary indices, A000120 length, A272020 reverse, A029931 sum.
A058891 counts set-systems, A003465 covering, A323818 connected.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A326031 gives weight of the set-system with BII-number n.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[Select[Subsets[Range[n]], Select[Tuples[bpe/@#],UnsameQ@@#&]=={}&]],{n,0,10}]

Formula

a(2^n - 1) = A367903(n).
Partial sums of A370589.

Extensions

a(21)-a(34) from Alois P. Heinz, Mar 09 2024
Previous Showing 11-20 of 109 results. Next