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 21 results. Next

A325095 Number of subsets of {1...n} with no binary carries.

Original entry on oeis.org

1, 2, 4, 5, 10, 12, 14, 15, 30, 35, 40, 42, 47, 49, 51, 52, 104, 119, 134, 139, 154, 159, 164, 166, 181, 186, 191, 193, 198, 200, 202, 203, 406, 458, 510, 525, 577, 592, 607, 612, 664, 679, 694, 699, 714, 719, 724, 726, 778, 793, 808, 813, 828, 833, 838, 840
Offset: 0

Views

Author

Gus Wiseman, Mar 27 2019

Keywords

Comments

A binary carry of two positive integers is an overlap of the positions of 1's in their reversed binary expansion. For example, the binary representations of {2,5,8} are:
2 = 10,
5 = 101,
8 = 1000,
and since there are no columns with more than one 1, {2,5,8} is counted under a(8).

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, b(n-1, t)+
         `if`(Bits[And](n, t)=0, b(n-1, Bits[Or](n, t)), 0))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..63);  # 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[#,Intersection[binpos[#1],binpos[#2]]!={}&]&]],{n,0,10}]

Formula

a(2^n - 1) = A000110(n + 1).

Extensions

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

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.

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).

A325099 Number of binary carry-connected strict integer partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 1, 4, 5, 8, 6, 11, 11, 15, 13, 18, 20, 30, 29, 43, 49, 68, 66, 84, 94, 125, 131, 165, 184, 237, 251, 291, 315, 383, 408, 486, 536, 663, 714, 832, 912, 1104, 1195, 1405, 1554, 1877, 2046, 2348, 2559, 2998, 3256, 3730, 4084, 4793, 5230, 5938
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(11) = 6 strict partitions (A = 10, B = 11):
  (1)  (2)  (3)  (4)   (5)   (6)    (7)  (8)   (9)    (A)    (B)
                 (31)  (32)  (51)        (53)  (54)   (64)   (65)
                             (321)       (62)  (63)   (73)   (74)
                                         (71)  (72)   (91)   (632)
                                               (531)  (532)  (731)
                                                      (541)  (5321)
                                                      (631)
                                                      (721)
		

Crossrefs

Programs

  • 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],UnsameQ@@#&&Length[csm[binpos/@#]]<=1&]],{n,0,30}]

A159912 Partial sums of A159913(k) = 2^bitcount(2k+1)-1 = A038573(2k+1), bitcount=A000120.

Original entry on oeis.org

0, 1, 4, 7, 14, 17, 24, 31, 46, 49, 56, 63, 78, 85, 100, 115, 146, 149, 156, 163, 178, 185, 200, 215, 246, 253, 268, 283, 314, 329, 360, 391, 454, 457, 464, 471, 486, 493, 508, 523, 554, 561, 576, 591, 622, 637, 668, 699, 762, 769, 784, 799, 830, 845, 876, 907
Offset: 0

Views

Author

M. F. Hasler, May 03 2009

Keywords

Comments

More precisely, a(n)=sum(iA159913(i)), since we want the sequence to start with a(0)=0 and not with A159913(0)=1.
a(n) is also the total number of ON cells after n generations in the outward corner version of the Ulam-Warburton cellular automaton of A147562, and a(n) is also the total number of Y-toothpicks after n generations in the outward corner version of the Y-toothpick structure of A160120. - David Applegate and Omar E. Pol, Jan 24 2016

Crossrefs

Programs

  • Mathematica
    Accumulate@ Table[2^(DigitCount[n, 2][[1]] + 1) - 1, {n, 0, 54}] (* Michael De Vlieger, Jan 25 2016 *)
  • PARI
    A159912(n)=sum(i=0,n-1,1<
    				

Formula

a(n) = sum( i=0...n-1, A159913(i)) = sum(i=0..n-1, 2^A000120(i))*2-n
a(n) = n + (A160720(n) - 1)/2 = n + 2*(A266532(n) - 1)/3 = n + 2*A267700(n-1), n >= 1. - Omar E. Pol, Jan 25 2016

A266532 Total number of Y-toothpicks after n-th stage in the "outward" version of the cellular automaton of A160120.

Original entry on oeis.org

0, 1, 4, 7, 16, 19, 28, 37, 58, 61, 70, 79, 100, 109, 130, 151, 196, 199, 208, 217, 238, 247, 268, 289, 334, 343, 364, 385, 430, 451, 496, 541, 634, 637, 646, 655, 676, 685, 706, 727, 772, 781, 802, 823, 868, 889, 934, 979, 1072, 1081, 1102, 1123, 1168, 1189, 1234, 1279, 1372, 1393, 1438, 1483, 1576, 1621, 1714, 1807, 1996, 1999, 2008, 2017
Offset: 0

Views

Author

David Applegate and Omar E. Pol, Jan 18 2016

Keywords

Comments

For the connection with A160720 (the "outward" version of the Ulam-Warburton cellular automaton A147562) see formula section and A267700.
A266533 (the first differences) gives the number of Y-toothpicks added to the structure at n-th stage.
First differs from A160120 at a(9).
First differs from A160715 at a(13).

Crossrefs

Formula

Conjecture: a(n) = 1 + 3*(A160720(n) - 1)/4 = 1 + 3*A267700(n-1), n >= 1. This formula is correct! - N. J. A. Sloane, Jan 23 2016
a(n) = 1 + 3*(A159912(n) - n)/2, n >= 1. - Omar E. Pol, Jan 24 2016

A266534 Total number of ON cells after n-th stage in a 90-degree sector of the cellular automaton of A151895.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 10, 13, 16, 21, 24, 29, 36, 37, 40, 43, 46, 53, 58, 65, 74, 83, 96, 107, 120, 133, 136, 143, 150, 157, 168, 179, 190, 209, 226, 247, 258, 271, 286, 299, 314, 327, 334, 349, 364, 381, 406, 417, 434, 455, 470, 493, 514, 533, 562, 583, 608, 631, 646, 661, 680, 703, 736, 761, 782, 807, 836, 857, 892, 927
Offset: 0

Views

Author

Omar E. Pol, Jan 12 2016

Keywords

Comments

The structure looks like a tree which arises from one of the four spokes of the structure of the cellular automaton of A151895.
a(n) is the total number of ON cells after n-th stage.
For n >> 1 the structure looks like a square which is rotated 45 degrees.
First differs from A161336 (snowflake tree) at a(16).
First differs from A266536 at a(13). - Omar E. Pol, Apr 02 2016

Crossrefs

Formula

a(n) = (A151895(n+1) - 1)/4.

Extensions

More terms from Omar E. Pol, Apr 02 2016

A266536 Total number of ON cells after n-th stage in a 90-degree sector of the cellular automaton of A170896.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 10, 13, 16, 21, 24, 29, 36, 39, 42, 45, 50, 57, 62, 71, 80, 91, 102, 111, 124, 137, 144, 151, 158, 167, 178, 189, 206, 223, 242, 261, 276, 293, 310, 327, 344, 359, 368, 385, 402, 423, 448, 467, 486, 509, 526, 547, 570, 595, 630, 655, 688, 717, 742, 763, 782, 809, 844, 871, 896, 921, 954, 977, 1016, 1059
Offset: 0

Views

Author

Omar E. Pol, Jan 12 2016

Keywords

Comments

The structure looks like a tree which arises from one of the four spokes of the structure of the cellular automaton of A170896.
a(n) is the total number of ON cells after n-th stage.
For n >> 1 the structure looks like a square which is rotated 45 degrees.
First differs from both A161336 (snowflake tree) and A266534 at a(13).

Crossrefs

Formula

a(n) = (A170896(n+1) - 1)/4.

A322662 a(n) is to A151723(n+1) as A319018(n+1) is to A147562(n+1), n >= 0.

Original entry on oeis.org

1, 13, 25, 109, 121, 193, 325, 493, 529, 661, 829, 1129, 1189, 1405, 1657, 2101, 2149, 2281, 2533, 3133, 3337, 3709, 4309, 4909, 5065, 5449, 5917, 6757, 6877, 7381, 7873, 8845, 8893, 9025, 9277, 9877, 10165, 10849, 11737
Offset: 0

Views

Author

Bradley Klee, Dec 22 2018

Keywords

Comments

Also the number of ON cells after n generations in a knight's-move, one-neighbor, accumulative cellular automaton on the hexagonal lattice A_2. Define v(m)=2*sqrt(3)*[cos(m*Pi/3+Pi/6), sin(m*Pi/3+Pi/6)], vL(m)=2*v(m)+v(m+1), vR(m)=2*v(m)+v(m-1). The set of "knight's moves", M={vL(m):m=1,2,..6} U {vR(m):m=1,2,..6}, follows from an analogy between Z^2 and A_2. At each generation all ON cells remain ON while an OFF cell turns ON if and only if it has exactly one M-neighbor in the previous generation.
Fractal Structure Theorem (FST). A pair of lattice vectors M={v1,v2} generate a wedge, W = {x*v1 + y*v2 : x>=0, y>=0}. Define W-Subsets T_k such that T_{k+1}= T_k U { 2^n*v1 + v : v in T_k } U {2^n*v2 + v : v in T_k}, T_0 = { [0,0] }. The limit set T_{oo} is a fractal, and acquires the topology of a binary tree when points are connected by either v1 or v2. As a tree, T_k has height 2^k-1, with 2^k vertices at maximum depth, along a line in the direction v1-v2. Assume a one-M-neighbor, accumulative cellular automaton on W, where all vertices in T_k are ON. In the next generation, the front F_k={2^k*v1+m*(v2-v1) : 0<=m<=2^k} contains only two ON cells, {2^k*v1,2^k*v2}. The spacing, 2^k-1, is wide enough to turn ON two copies of T_k, one starting from each of the two ON cells in F_k. Thus T_{k+1} is also ON. Whenever only T_0 is ON as an initial condition, by induction, T_{oo} is ultimately ON.
The FST applies here to 12 distinct wedges: with {v1,v2}={vL(m), vR(m)} or with (v1,v2)={vL(m), vR(m+1)}, and m=1,2,..6. The triangle inequality ensures that paths including other vectors cannot reach the front F_k by generation 2^k. However, other vectors do generate retrogressive growth, which turns ON many additional cells.
The FST applies to a wide range of Cellular Automata. Wolfram's one-dimensional rule 90 gives the most elementary example where T_{oo} determines every ON cell. The tree structure T_{oo} also occurs with two-dimensional, accumulative, one-neighbor C.A. such as A151723, A319018, A147562. Also try: M={[0,1],[0,-1],[2,1],[-2,-1]}.
According to S. Ulam (cf. Links), some version of the FST was already known to J. Holladay circa 1960.
The FST implies scale resonance between this cellular automaton and the arrowed half hexagon tiling (cf. Links).

Crossrefs

Hexagonal: A151723. Square: A319018, A147562. Tree: A006046, A267700, A038573. A322663.

Programs

  • Mathematica
    HexStar=2*Sqrt[3]*{Cos[#*Pi/3+Pi/6],Sin[#*Pi/3+Pi/6]}&/@Range[0,5];
    MoveSet=Join[2*HexStar+RotateRight[HexStar],2*HexStar+RotateLeft[HexStar]];
    Clear@Pts;Pts[0] = {{0, 0}};
    Pts[n_]:=Pts[n]=With[{pts=Pts[n-1]},Union[pts,Cases[Tally[Flatten[pts/.{x_,y_}:> Evaluate[{x,y}+#&/@MoveSet],1]],{x_,1}:>x]]];Length[Pts[#]]&/@Range[0,32]
Previous Showing 11-20 of 21 results. Next