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

A325106 Number of divisible binary-containment pairs of positive integers up to n.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, 28, 31, 32, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 56, 57, 58, 61, 63, 64, 65, 66, 67, 70, 71, 72, 77, 77, 78, 79, 80, 81
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A pair of positive integers is divisible if the first divides the second, and is a binary containment if the positions of 1's in the reversed binary expansion of the first are a subset of the positions of 1's in the reversed binary expansion of the second.

Examples

			The a(3) = 1 through a(12) = 8 pairs:
  {1,3}  {1,3}  {1,3}  {1,3}  {1,3}  {1,3}  {1,3}  {1,3}   {1,3}   {1,3}
                {1,5}  {1,5}  {1,5}  {1,5}  {1,5}  {1,5}   {1,5}   {1,5}
                       {2,6}  {1,7}  {1,7}  {1,7}  {1,7}   {1,7}   {1,7}
                              {2,6}  {2,6}  {1,9}  {1,9}   {1,9}   {1,9}
                                            {2,6}  {2,6}   {2,6}   {2,6}
                                                   {2,10}  {1,11}  {1,11}
                                                           {2,10}  {2,10}
                                                                   {4,12}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n],{2}],Divisible[#[[2]],#[[1]]]&&SubsetQ[Position[Reverse[IntegerDigits[#[[2]],2]],1],Position[Reverse[IntegerDigits[#1[[1]],2]],1]]&]],{n,0,30}]

Formula

a(n) = A325101(n) - n.

A325103 Number of increasing pairs of positive integers up to n with no binary carries.

Original entry on oeis.org

0, 0, 1, 1, 4, 5, 6, 6, 13, 16, 19, 20, 23, 24, 25, 25, 40, 47, 54, 57, 64, 67, 70, 71, 78, 81, 84, 85, 88, 89, 90, 90, 121, 136, 151, 158, 173, 180, 187, 190, 205, 212, 219, 222, 229, 232, 235, 236, 251, 258, 265, 268, 275, 278, 281, 282, 289, 292, 295, 296
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A binary carry of two positive integers is an overlap of the positions of 1's in their reversed binary expansion.

Examples

			The a(2) = 1 through a(9) = 16 pairs:
  {1,2}  {1,2}  {1,2}  {1,2}  {1,2}  {1,2}  {1,2}  {1,2}
                {1,4}  {1,4}  {1,4}  {1,4}  {1,4}  {1,4}
                {2,4}  {2,4}  {1,6}  {1,6}  {1,6}  {1,6}
                {3,4}  {2,5}  {2,4}  {2,4}  {1,8}  {1,8}
                       {3,4}  {2,5}  {2,5}  {2,4}  {2,4}
                              {3,4}  {3,4}  {2,5}  {2,5}
                                            {2,8}  {2,8}
                                            {3,4}  {2,9}
                                            {3,8}  {3,4}
                                            {4,8}  {3,8}
                                            {5,8}  {4,8}
                                            {6,8}  {4,9}
                                            {7,8}  {5,8}
                                                   {6,8}
                                                   {6,9}
                                                   {7,8}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n],{2}],Intersection[Position[Reverse[IntegerDigits[#[[1]],2]],1],Position[Reverse[IntegerDigits[#[[2]],2]],1]]=={}&]],{n,0,30}]

Formula

a(n) = A325102(n)/2.

A325104 Number of increasing pairs of positive integers up to n with at least one binary carry.

Original entry on oeis.org

0, 0, 0, 2, 2, 5, 9, 15, 15, 20, 26, 35, 43, 54, 66, 80, 80, 89, 99, 114, 126, 143, 161, 182, 198, 219, 241, 266, 290, 317, 345, 375, 375, 392, 410, 437, 457, 486, 516, 551, 575, 608, 642, 681, 717, 758, 800, 845, 877, 918, 960, 1007, 1051, 1100, 1150, 1203
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A binary carry of two positive integers is an overlap of the positions of 1's in their reversed binary expansion.
The version for ordered pairs is A080572.

Examples

			The a(3) = 2 through a(8) = 15 pairs:
  {1,3}  {1,3}  {1,3}  {1,3}  {1,3}  {1,3}
  {2,3}  {2,3}  {1,5}  {1,5}  {1,5}  {1,5}
                {2,3}  {2,3}  {1,7}  {1,7}
                {3,5}  {2,6}  {2,3}  {2,3}
                {4,5}  {3,5}  {2,6}  {2,6}
                       {3,6}  {2,7}  {2,7}
                       {4,5}  {3,5}  {3,5}
                       {4,6}  {3,6}  {3,6}
                       {5,6}  {3,7}  {3,7}
                              {4,5}  {4,5}
                              {4,6}  {4,6}
                              {4,7}  {4,7}
                              {5,6}  {5,6}
                              {5,7}  {5,7}
                              {6,7}  {6,7}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n],{2}],Intersection[Position[Reverse[IntegerDigits[#[[1]],2]],1],Position[Reverse[IntegerDigits[#[[2]],2]],1]]!={}&]],{n,0,30}]

Formula

a(n) = 2 * A080572(n - 2) + n.

A325098 Number of binary carry-connected integer partitions of n.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 7, 13, 15, 23, 27, 42, 50, 72, 88, 125, 153, 211, 258, 349, 430, 569, 698, 914, 1119, 1444, 1765, 2252, 2745, 3470, 4214, 5276, 6387, 7934, 9568, 11800, 14181, 17379, 20818, 25351, 30264, 36668, 43633, 52589, 62394, 74872, 88576, 105818
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A binary carry of two positive integers is an overlap of the positions of 1's in their reversed binary expansion. An integer partition is binary carry-connected if the graph whose vertices are the parts and whose edges are binary carries is connected.

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (32)     (33)      (322)      (44)
                    (31)    (311)    (51)      (331)      (53)
                    (1111)  (11111)  (222)     (511)      (62)
                                     (321)     (3211)     (71)
                                     (3111)    (31111)    (332)
                                     (111111)  (1111111)  (2222)
                                                          (3221)
                                                          (3311)
                                                          (5111)
                                                          (32111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

Programs

  • Maple
    h:= proc(n, s) local i, m; m:= n;
          for i in s do m:= Bits[Or](m, i) od; {m}
        end:
    g:= (n, s)-> (w-> `if`(w={}, s union {n}, s minus w union
                  h(n, w)))(select(x-> Bits[And](n, x)>0, s)):
    b:= proc(n, i, s) option remember; `if`(n=0, `if`(nops(s)>1, 0, 1),
          `if`(i<1, 0, b(n, i-1, s)+ b(n-i, min(i, n-i), g(i, s))))
        end:
    a:= n-> b(n$2, {}):
    seq(a(n), n=0..50);  # Alois P. Heinz, Mar 29 2019
  • Mathematica
    binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>0]&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
    Table[Length[Select[IntegerPartitions[n],Length[csm[binpos/@#]]<=1&]],{n,0,20}]
    (* Second program: *)
    h[n_, s_] := Module[{i, m = n}, Do[m = BitOr[m, i], {i, s}]; {m}];
    g[n_, s_] := Function[w, If[w == {}, s ~Union~ {n}, (s ~Complement~ w) ~Union~
        h[n, w]]][Select[s, BitAnd[n, #] > 0&]];
    b[n_, i_, s_] := b[n, i, s] = If[n == 0, If[Length[s] > 1, 0, 1],
        If[i < 1, 0, b[n, i - 1, s] + b[n - i, Min[i, n - i], g[i, s]]]];
    a[n_] := b[n, n, {}];
    a /@ Range[0, 50] (* Jean-François Alcover, May 11 2021, after Alois P. Heinz *)

Extensions

a(21)-a(48) from Alois P. Heinz, Mar 29 2019

A325110 Number of strict integer partitions of n with no binary containments.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 5, 2, 3, 2, 6, 3, 6, 7, 15, 8, 10, 6, 13, 6, 10, 12, 23, 13, 16, 16, 26, 21, 30, 37, 60, 43, 52, 42, 60, 42, 50, 54, 81, 59, 60, 66, 80, 74, 86, 108, 145, 119, 125, 126, 144, 134, 140, 170, 208, 189, 193, 221, 248, 253, 292, 323, 435, 392
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A pair of positive integers is a binary containment if the positions of 1's in the reversed binary expansion of the first are a subset of the positions of 1's in the reversed binary expansion of the second.

Examples

			The a(1) = 1 through a(12) = 3 partitions (A = 10, B = 11, C = 12):
  (1)  (2)  (3)   (4)  (5)   (6)   (7)    (8)   (9)   (A)   (B)    (C)
            (21)       (41)  (42)  (43)   (53)  (63)  (82)  (65)   (84)
                                   (52)         (81)        (83)   (93)
                                   (61)                     (92)
                                   (421)                    (A1)
                                                            (821)
		

Crossrefs

Programs

  • Mathematica
    binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&stableQ[#,SubsetQ[binpos[#1],binpos[#2]]&]&]],{n,0,30}]

A325109 Number of integer partitions of n whose distinct parts have no binary containments.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 8, 10, 12, 15, 18, 23, 28, 32, 41, 52, 57, 66, 76, 90, 99, 117, 131, 157, 172, 194, 216, 255, 276, 313, 358, 410, 447, 511, 546, 630, 677, 750, 818, 945, 990, 1108, 1200, 1338, 1429, 1606, 1713, 1928, 2062, 2263, 2412, 2725, 2847, 3142, 3389
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A pair of positive integers is a binary containment if the positions of 1's in the reversed binary expansion of the first are a subset of the positions of 1's in the reversed binary expansion of the second.

Examples

			The a(1) = 1 through a(8) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (41)     (33)      (43)       (44)
             (111)  (211)   (221)    (42)      (52)       (53)
                    (1111)  (2111)   (222)     (61)       (422)
                            (11111)  (411)     (421)      (611)
                                     (2211)    (2221)     (2222)
                                     (21111)   (4111)     (4211)
                                     (111111)  (22111)    (22211)
                                               (211111)   (41111)
                                               (1111111)  (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

Programs

  • Maple
    c:= proc() option remember; local i, x, y;
          x, y:= map(n-> Bits[Split](n), [args])[];
          for i to nops(x) do
            if x[i]=1 and y[i]=0 then return false fi
          od; true
        end:
    b:= proc(n, i, s) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, s)+`if`(ormap(j-> c(i, j), s), 0, add(
          b(n-i*j, i-1, s union {i}), j=1..n/i))))
        end:
    a:= n-> b(n$2, {}):
    seq(a(n), n=0..55);  # Alois P. Heinz, Mar 29 2019
  • Mathematica
    binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[IntegerPartitions[n],stableQ[#,SubsetQ[binpos[#1],binpos[#2]]&]&]],{n,0,15}]
    (* Second program: *)
    c[args_List] := c[args] = Module[{i, x, y}, {x, y} = Reverse@IntegerDigits[#, 2]& /@ args; For[i = 1, i <= Length[x], i++, If[x[[i]] == 1 && y[[i]] == 0, Return[False]]]; True];
    b[n_, i_, s_List] := b[n, i, s] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1, s] + If[AnyTrue[s, c[{i, #}]&], 0, Sum[b[n - i*j, i-1, s ~Union~ {i}], {j, 1, n/i}]]]];
    a[n_] := b[n, n, {}];
    a /@ Range[0, 55] (* Jean-François Alcover, Jun 03 2021, after Alois P. Heinz *)

Extensions

a(31)-a(54) from Alois P. Heinz, Mar 29 2019

A325101 Number of divisible binary-containment pairs of positive integers up to n.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 9, 11, 12, 14, 16, 18, 20, 22, 24, 28, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 53, 55, 57, 61, 63, 64, 66, 68, 70, 72, 74, 76, 79, 81, 83, 85, 87, 89, 93, 95, 97, 99, 101, 103, 107, 109, 111, 115, 118, 120, 122, 124, 126, 130, 132, 134
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A pair of positive integers is divisible if the first divides the second, and is a binary containment if the positions of 1's in the reversed binary expansion of the first are a subset of those in the second.

Examples

			The a(1) = 1 through a(8) = 12 pairs:
  (1,1)  (1,1)  (1,1)  (1,1)  (1,1)  (1,1)  (1,1)  (1,1)
         (2,2)  (1,3)  (1,3)  (1,3)  (1,3)  (1,3)  (1,3)
                (2,2)  (2,2)  (1,5)  (1,5)  (1,5)  (1,5)
                (3,3)  (3,3)  (2,2)  (2,2)  (1,7)  (1,7)
                       (4,4)  (3,3)  (2,6)  (2,2)  (2,2)
                              (4,4)  (3,3)  (2,6)  (2,6)
                              (5,5)  (4,4)  (3,3)  (3,3)
                                     (5,5)  (4,4)  (4,4)
                                     (6,6)  (5,5)  (5,5)
                                            (6,6)  (6,6)
                                            (7,7)  (7,7)
                                                   (8,8)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Tuples[Range[n],2],Divisible[#[[2]],#[[1]]]&&SubsetQ[Position[Reverse[IntegerDigits[#[[2]],2]],1],Position[Reverse[IntegerDigits[#1[[1]],2]],1]]&]],{n,0,30}]

Formula

a(n) = A325106(n) + n.

A325107 Number of subsets of {1...n} with no binary containments.

Original entry on oeis.org

1, 2, 4, 5, 10, 13, 18, 19, 38, 52, 77, 83, 133, 147, 166, 167, 334, 482, 764, 848, 1465, 1680, 1987, 2007, 3699, 4413, 5488, 5572, 7264, 7412, 7579, 7580, 15160, 22573, 37251, 42824, 77387, 92863, 116453, 118461, 227502, 286775, 382573, 392246, 555661, 574113
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A pair of positive integers is a binary containment if the positions of 1's in the reversed binary expansion of the first are a subset of the positions of 1's in the reversed binary expansion of the second.

Examples

			The a(0) = 1 through a(6) = 18 subsets:
  {}  {}   {}     {}     {}       {}       {}
      {1}  {1}    {1}    {1}      {1}      {1}
           {2}    {2}    {2}      {2}      {2}
           {1,2}  {3}    {3}      {3}      {3}
                  {1,2}  {4}      {4}      {4}
                         {1,2}    {5}      {5}
                         {1,4}    {1,2}    {6}
                         {2,4}    {1,4}    {1,2}
                         {3,4}    {2,4}    {1,4}
                         {1,2,4}  {2,5}    {1,6}
                                  {3,4}    {2,4}
                                  {3,5}    {2,5}
                                  {1,2,4}  {3,4}
                                           {3,5}
                                           {3,6}
                                           {5,6}
                                           {1,2,4}
                                           {3,5,6}
		

Crossrefs

Programs

  • Maple
    c:= proc() option remember; local i, x, y;
          x, y:= map(n-> Bits[Split](n), [args])[];
          for i to nops(x) do
            if x[i]=1 and y[i]=0 then return false fi
          od; true
        end:
    b:= proc(n, s) option remember; `if`(n=0, 1, b(n-1, s)+
         `if`(ormap(i-> c(n, i), s), 0, b(n-1, s union {n})))
        end:
    a:= n-> b(n, {}):
    seq(a(n), n=0..34);  # Alois P. Heinz, Mar 28 2019
  • Mathematica
    binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[Subsets[Range[n]],stableQ[#,SubsetQ[binpos[#1],binpos[#2]]&]&]],{n,0,13}]

Formula

a(2^n - 1) = A014466(n).

Extensions

a(16)-a(45) from Alois P. Heinz, Mar 28 2019

A325102 Number of ordered pairs of positive integers up to n with no binary carries.

Original entry on oeis.org

0, 0, 2, 2, 8, 10, 12, 12, 26, 32, 38, 40, 46, 48, 50, 50, 80, 94, 108, 114, 128, 134, 140, 142, 156, 162, 168, 170, 176, 178, 180, 180, 242, 272, 302, 316, 346, 360, 374, 380, 410, 424, 438, 444, 458, 464, 470, 472, 502, 516, 530, 536, 550, 556, 562, 564, 578
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2019

Keywords

Comments

A binary carry of two positive integers is an overlap of the positions of 1's in their reversed binary expansion.

Examples

			The a(2) = 2 through a(6) = 12 pairs:
  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)
  (2,1)  (2,1)  (1,4)  (1,4)  (1,4)  (1,4)
                (2,1)  (2,1)  (1,6)  (1,6)
                (2,4)  (2,4)  (2,1)  (2,1)
                (3,4)  (2,5)  (2,4)  (2,4)
                (4,1)  (3,4)  (2,5)  (2,5)
                (4,2)  (4,1)  (3,4)  (3,4)
                (4,3)  (4,2)  (4,1)  (4,1)
                       (4,3)  (4,2)  (4,2)
                       (5,2)  (4,3)  (4,3)
                              (5,2)  (5,2)
                              (6,1)  (6,1)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Tuples[Range[n],2],Intersection[Position[Reverse[IntegerDigits[#[[1]],2]],1],Position[Reverse[IntegerDigits[#[[2]],2]],1]]=={}&]],{n,0,30}]

Formula

a(n) = 2 * A325103(n).
Showing 1-9 of 9 results.