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.

Showing 1-4 of 4 results.

A175020 An integer n is included if n is the smallest positive integer with its particular multiset of run-lengths (of either 0 or 1 considered together) in its binary representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 15, 16, 17, 18, 19, 21, 24, 31, 32, 33, 34, 35, 36, 37, 42, 48, 51, 56, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 76, 85, 96, 99, 112, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 140, 146, 147, 149, 170, 192, 195, 199, 204, 224
Offset: 1

Views

Author

Leroy Quet, Nov 03 2009

Keywords

Comments

This sequence gives a way to enumerate unrestricted partitions of a number. The number of terms of this sequence that are each >= 2^(k-1) and <= 2^k -1 is equal to the number of unrestricted partitions of k.
Equivalently, numbers in whose binary representation the runs of 1's are in increasing order of length, the runs of 0's are in decreasing order of length, and all runs of 0's are at least as long as any run of 1's. The position of [1^m] in the partitions of m will be P(m-1). It is the last partition in the list with a part of size 1; anything with a part of size 2 or more will start 100... in the binary representation, while this partition starts 101...; and any partition that does not have a part of size 1 will start 11.... Removing one part of size 1 from the partitions of size m that have such a part gives each partition of m-1 uniquely. This relationship is expressed by the second formula of A002865. - Franklin T. Adams-Watters, Nov 03 2009
A000975 is a subsequence. - Alford Arnold, Nov 09 2009

Examples

			9 in binary is 1001. The run lengths form the multiset (1,2,1). Since no positive integer < 9 has this same multiset of run lengths, then 9 is in this sequence. On the other hand, 23 in binary is 10111. The run-lengths are (1,1,3). But 17 (which is < 23) in binary is 10001, which has the run-lengths of (1,3,1). Since the multisets (1,1,3) and (1,3,1) are identical, then 23 is not in this sequence.
		

Crossrefs

Cf. A175021 (complement), A175022, A175023, A175024, A000975.

Programs

  • Maple
    runLSet := proc(n) option remember ; local bdg,lset,arl,p ; bdg := convert(n,base,2) ; lset := [] ; arl := -1 ; for p from 1 to nops(bdg) do if p = 1 then arl := 1 ; elif op(p,bdg) = op(p-1,bdg) then arl := arl+1 ; else if arl > 0 then lset := [arl,op(lset)] ; end if; arl := 1 ; end if; end do ; if arl > 0 then lset := [arl,op(lset)] ; end if; return lset ; end proc:
    isA175020 := proc(n) local thisLset,k ; thisLset := runLSet(n) ; for k from 1 to n-1 do if convert(runLSet(k),multiset) = convert(thisLset,multiset) then return false; end if; end do ; return true; end proc:
    for n from 1 to 300 do if isA175020(n) then printf("%d,",n) ; end if; end do;
    # R. J. Mathar, Feb 27 2010
  • Mathematica
    With[{s = Array[Sort@ Map[Length, Split@ IntegerDigits[#, 2]] &, 224]}, Values[PositionIndex@ s][[All, 1]]] (* Michael De Vlieger, Sep 03 2017 *)

Extensions

More terms from Alford Arnold, Nov 09 2009
Terms beyond 64 by R. J. Mathar, Feb 27 2010

A175022 a(n) = the number of runs (those of 0 and of 1 considered together) in the binary representation of A175020(n).

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 03 2009

Keywords

Comments

a(n) gives the number of terms in row n of irregular tables A175023 and A175024.

Crossrefs

Programs

  • Mathematica
    With[{s = Array[Sort@ Map[Length, Split@ IntegerDigits[#, 2]] &, 265]}, Map[Length@ Split@ IntegerDigits[#, 2] &, Values[PositionIndex@ s][[All, 1]] ]] (* Michael De Vlieger, Sep 03 2017 *)

Extensions

Extended by Ray Chandler, Mar 11 2010

A175023 Irregular table read by rows: Row n (of A175022(n) terms) contains the run-lengths in the binary representation of A175020(n), reading left to right.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 03 2009

Keywords

Comments

This table lists the parts of the partitions of the positive integers. Each partition is represented exactly once in this table. If n is such that 2^(m-1) <= A175020(n) <= 2^m -1, then row n of this table gives one partition of m.

Examples

			Table to start:
1
1,1
2
1,2
1,1,1
3
1,3
1,2,1
1,1,1,1
2,2
4
1,4
1,3,1
1,2,1,1
1,2,2
1,1,1,1,1
2,3
5
Note there are: 1 row that sums to 1, two rows that sum to 2, three rows that sum to 3, five rows that sum to 4, seven rows that sum to 5, etc, where 1,2,3,5,7,... are the number of unrestricted partitions of 1,2,3,4,5,...
		

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Feb 27 2010: (Start)
    runLSet := proc(n) option remember ; local bdg,lset,arl,p ; bdg := convert(n,base,2) ; lset := [] ; arl := -1 ; for p from 1 to nops(bdg) do if p = 1 then arl := 1 ; elif op(p,bdg) = op(p-1,bdg) then arl := arl+1 ; else if arl > 0 then lset := [arl,op(lset)] ; end if; arl := 1 ; end if; end do ; if arl > 0 then lset := [arl,op(lset)] ; end if; return lset ; end proc:
    A175023 := proc(n) local thisLset,k ; thisLset := runLSet(n) ; for k from 1 to n-1 do if convert(runLSet(k),multiset) = convert(thisLset,multiset) then return ; end if; end do ; printf("%a,",thisLset) ; return ; end proc:
    for n from 1 to 80 do A175023(n) ; end do; (End)
  • Mathematica
    With[{s = Array[Sort@ Map[Length, Split@ IntegerDigits[#, 2]] &, 73]}, Map[Length /@ Split@ IntegerDigits[#, 2] &, Values[PositionIndex@ s][[All, 1]] ]] // Flatten (* Michael De Vlieger, Sep 03 2017 *)

Extensions

Terms beyond the 18th row from R. J. Mathar, Feb 27 2010

A175025 Irregular table read by rows: Row n (of A175022(n) terms) contains the terms of row n of table A175023 with these terms arranged in nonincreasing order.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 03 2009

Keywords

Comments

This table lists the parts of the partitions of the positive integers. Each partition is represented exactly once in this table. If n is such that 2^(m-1) <= A175020(n) <= 2^m -1, then row n of this table gives one partition of m.

Examples

			Table to start:
1
1,1
2
2,1
1,1,1
3
3,1
2,1,1
1,1,1,1
2,2
4
4,1
3,1,1
2,1,1,1
2,2,1
1,1,1,1,1
3,2
5
Note there are: 1 row that sums to 1, two rows that sum to 2, three rows that sum to 3, five rows that sum to 4, seven rows that sum to 5, etc., where 1,2,3,5,7,... are the number of unrestricted partitions of 1,2,3,4,5,...
		

Crossrefs

Extensions

Extended by Ray Chandler, Mar 11 2010
Showing 1-4 of 4 results.