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

A167755 Match the multisets in A175020 with those in A037016 then merge the two sequences.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 5, 4, 6, 7, 7, 10, 10, 12, 12, 9, 13, 8, 14, 15, 15, 21, 21, 19, 25, 18, 26, 24, 28, 17, 29, 16, 30, 31, 31, 42, 42, 36, 50, 51, 51, 37, 53, 56, 56, 35, 57, 34, 58, 48, 60, 33, 61, 32, 62, 63, 63
Offset: 1

Views

Author

Alford Arnold, Nov 10 2009

Keywords

Comments

A175020 records the multiset with minimum value; whereas A037016 is based on reading binary expansion from right to left, run lengths increase.

Examples

			After the initial zero, A037016 begins:
  1
  2 3
  5 6 7
  10 12 13 14 15
  21 25 26 28 29 30 31
  42 50 51 53 56 57 58 60 61 62 63
  85 ...
and after resorting, A175020 begins:
  1
  2 3
  5 4 7
  10 12 9 8 15
  21 ...
so the irregular table begins:
  1 1
  2 2 3 3
  5 5 4 6 7 7
  10 10 12 12 9 13 8 14 15 15
  etc.
In binary, the number 9 maps to multiset (1,2,1) and the number 13 maps to (2,1,1), so 9 and 13 appear together in the sequence.
		

Crossrefs

Cf. A000041 (1/2 row length of the irregular Table). A000975 (first & second column).

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

A037013 Reading binary expansion from right to left, run lengths strictly decrease.

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 15, 16, 24, 31, 32, 39, 48, 63, 64, 79, 96, 112, 127, 128, 143, 159, 192, 224, 255, 256, 287, 319, 384, 399, 448, 480, 511, 512, 543, 575, 624, 639, 768, 799, 896, 960, 1023, 1024, 1087, 1151, 1248, 1279, 1536, 1567, 1599, 1792, 1920, 1984, 2047, 2048, 2111
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A037014, cf. A037015, A037016.

Programs

  • Haskell
    import Data.List (unfoldr, group)
    a037013 n = a037013_list !! (n-1)
    a037013_list = 0 : filter
       (all (< 0) . (\x -> zipWith (-) (tail $ rls x) $ rls x)) [1..] where
           rls = map length . group . unfoldr
                 (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
    -- Reinhard Zumkeller, Mar 10 2012
  • Mathematica
    Select[Range[0,2200],Min[Differences[Length/@Split[ IntegerDigits[ #,2]]]]>0&] (* Harvey P. Dale, Dec 17 2012 *)

Extensions

More terms from Patrick De Geest, Feb 15 1999
Offset fixed and missing 1024 and 2047 inserted by Reinhard Zumkeller, Mar 10 2012

A037015 Numbers n with property that, reading binary expansion of n from right to left, run lengths strictly increase.

Original entry on oeis.org

0, 1, 3, 6, 7, 14, 15, 28, 30, 31, 57, 60, 62, 63, 120, 121, 124, 126, 127, 241, 248, 249, 252, 254, 255, 483, 496, 497, 504, 505, 508, 510, 511, 966, 993, 995, 1008, 1009, 1016, 1017, 1020, 1022, 1023, 1987, 1990, 2016, 2017, 2019, 2032, 2033, 2040, 2041, 2044
Offset: 1

Views

Author

Keywords

Comments

There are A000009(k) elements of this list consisting of k bits. - Jason Kimberley, Jan 22 2013

Examples

			From _Jason Kimberley_, Jan 30 2013: (Start)
Interleaved lines:
binary expansions,
corresponding run lengths (distinct partitions);
1,
1;
11,
2;
110, 111,
2,1; 3;
1110, 1111,
3,1; 4;
11100, 11110, 11111,
3,2; 4,1; 5;
111001, 111100, 111110, 111111,
3,2,1; 4,2; 5,1; 6;
1111000, 1111001, 1111100, 1111110, 1111111,
4,3; 4,2,1; 5,2; 6,1; 7;
11110001, 11111000, 11111001, 11111100, 11111110, 11111111
4,3,1; 5,3; 5,2,1; 6,2; 7,1; 8;
111100011, 111110000, 111110001, 111111000, 111111001, 111111100, 111111110, 111111111,
4,3,2; 5,4; 5,3,1; 6,3; 6,2,1; 7,2; 8,1; 9;
Notice the reversed sorting when a part corresponds to a run of 0's.
(End)
		

Crossrefs

Subsequence of A037016, cf. A037013, A037014.
Cf. A030308.

Programs

  • Haskell
    import Data.List (group)
    a037015 n = a037015_list !! (n-1)
    a037015_list = filter (all (> 0) . ds) [0..] where
       ds x = zipWith (-) (tail gs) gs where
          gs = map length $ group $ a030308_row x
    -- Reinhard Zumkeller, Jul 31 2013, Mar 10 2012
    
  • Mathematica
    Select[Range[0,2500],Min[Differences[Length/@Split[ Reverse[ IntegerDigits[ #,2]]]]]>0&] (* Harvey P. Dale, Nov 18 2014 *)
    Select[Range[0,2100],Max[Differences[Length/@Split[IntegerDigits[#,2]]]]<0&] (* Harvey P. Dale, Jun 28 2020 *)
  • Python
    from itertools import groupby
    A037015_list = []
    for n in range(10**5):
        c = None
        for x, y in groupby(bin(n)[2:]):
            z = len(list(y))
            if c != None and z >= c:
                break
            c = z
        else:
            A037015_list.append(n) # Chai Wah Wu, Sep 14 2021

Extensions

More terms from Patrick De Geest, Feb 15 1999
Offset fixed and missing 1023 inserted by Reinhard Zumkeller, Mar 10 2012

A037014 Numbers n with property that reading binary expansion from right to left (from least significant to most significant), run lengths do not increase.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 12, 15, 16, 19, 20, 21, 23, 24, 31, 32, 39, 40, 42, 43, 44, 47, 48, 51, 56, 63, 64, 71, 76, 79, 80, 83, 84, 85, 87, 88, 95, 96, 103, 112, 127, 128, 143, 152, 159, 160, 167, 168, 170, 171, 172, 175, 176, 179, 184, 191, 192, 199, 204, 207
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A037013 (subsequence), A037016, A037015.

Programs

  • Haskell
    import Data.List (unfoldr, group)
    a037014 n = a037014_list !! (n-1)
    a037014_list = 0 : filter
       (all (<= 0) . (\x -> zipWith (-) (tail $ rls x) $ rls x)) [1..] where
           rls = map length . group . unfoldr
                 (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
    -- Reinhard Zumkeller, Mar 10 2012
  • Mathematica
    Select[Range[0,250],Min[Differences[Length/@Split[IntegerDigits[ #,2]]]]>= 0&] (* Harvey P. Dale, Jan 30 2013 *)

Extensions

More terms from Patrick De Geest, Feb 15 1999
Offset fixed by Reinhard Zumkeller, Mar 10 2012

A335835 Sort the run lengths in binary expansion of n in descending order (with multiplicities).

Original entry on oeis.org

0, 1, 2, 3, 6, 5, 6, 7, 14, 13, 10, 13, 12, 13, 14, 15, 30, 29, 26, 25, 26, 21, 26, 29, 28, 25, 26, 25, 28, 29, 30, 31, 62, 61, 58, 57, 50, 53, 50, 57, 58, 53, 42, 53, 50, 53, 58, 61, 60, 57, 50, 51, 50, 53, 50, 57, 56, 57, 58, 57, 60, 61, 62, 63, 126, 125
Offset: 0

Views

Author

Rémy Sigrist, Jun 26 2020

Keywords

Comments

This sequence preserves the number of runs (A005811) and the length (A070939) of the binary representation of a number.

Examples

			For n = 72:
- the binary representation of 72 is "1001000",
- the corresponding run lengths are: 1, 2, 1, 3,
- in descending order: 3, 2, 1, 1,
- so the binary representation of a(72) is "1110010",
- and a(72) = 114.
		

Crossrefs

Cf. A005811, A037016 (fixed points), A070939, A101211, A335834.

Programs

  • PARI
    torl(n) = { my (rr=[]); while (n, my (r=valuation(n+(n%2), 2)); rr = concat(r, rr); n\=2^r); rr }
    fromrl(rr) = { my (v=0); for (k=1, #rr, v = (v+(k%2))*2^rr[k]-(k%2)); v }
    a(n) = { fromrl(vecsort(torl(n),,4)) }

Formula

a(a(n)) = a(n).

A331625 Numbers k such that both k and k+1 are exceptional (A072066).

Original entry on oeis.org

1215, 98415, 273375, 413343, 846368, 1987983, 2302911, 6082047, 6200144, 8089712, 9034496, 9861183, 11868848, 13010463, 13325391, 13955247, 16159743, 16592768, 17537552, 18482336, 20686832, 20883663, 21198591, 22143375, 22891328, 23206256, 24347871, 25607583
Offset: 1

Views

Author

Jianing Song, Jan 22 2020

Keywords

Comments

Conjecture: for every p > 0, there exist infinitely many k such that k, k+1, ..., k+p-1 are all exceptional numbers. In specific, there exist infinitely many k such that both k and k+1 are exceptional.

Examples

			1215 = 3^5 * 5, 1216 = 2^6 * 19;
thus A037019(1215) = 2^4 * 3^2 * 5^2 * 7^2 * 11^2 * 13^2 = 3607203600, A037016(1216) = 2^18 * 3 * 5 * 7 * 11 * 13 * 17 = 66913566720;
but the smallest number with 1215 divisors is 3073593600 = 2^8 * 3^4 * 5^2 * 7^2 * 11^2, the smallest number with 1216 divisors is 35424829440 = 2^18 * 3^3 * 5 * 7 * 11 * 13;
so both 1215 and 1216 are exceptional, so 1215 is a term.
		

Crossrefs

Programs

Extensions

More terms from Jinyuan Wang, Jan 21 2025
Showing 1-7 of 7 results.