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

A365043 Number of subsets of {1..n} whose greatest element can be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

0, 0, 1, 3, 7, 12, 21, 32, 49, 70, 99, 135, 185, 245, 323, 418, 541, 688, 873, 1094, 1368, 1693, 2092, 2564, 3138, 3810, 4620, 5565, 6696, 8012, 9569, 11381, 13518, 15980, 18872, 22194, 26075, 30535, 35711, 41627, 48473, 56290, 65283, 75533, 87298, 100631, 115911, 133219
Offset: 0

Views

Author

Gus Wiseman, Aug 25 2023

Keywords

Comments

Sets of this type may be called "positive combination-full".
Also subsets of {1..n} such that some element can be written as a (strictly) positive linear combination of the others.

Examples

			The subset S = {3,4,9} has 9 = 3*3 + 0*4, but this is not strictly positive, so S is not counted under a(9).
The subset S = {3,4,10} has 10 = 2*3 + 1*4, so S is counted under a(10).
The a(0) = 0 through a(5) = 12 subsets:
  .  .  {1,2}  {1,2}    {1,2}    {1,2}
               {1,3}    {1,3}    {1,3}
               {1,2,3}  {1,4}    {1,4}
                        {2,4}    {1,5}
                        {1,2,3}  {2,4}
                        {1,2,4}  {1,2,3}
                        {1,3,4}  {1,2,4}
                                 {1,2,5}
                                 {1,3,4}
                                 {1,3,5}
                                 {1,4,5}
                                 {2,3,5}
		

Crossrefs

The binary complement is A007865, first differences A288728.
The binary version is A093971, first differences A365070.
The nonnegative complement is A326083, first differences A124506.
The nonnegative version is A364914, first differences A365046.
First differences are A365042.
The complement is counted by A365044, first differences A365045.
Without re-usable parts we have A364534, first differences A365069.
A085489 and A364755 count subsets with no sum of two distinct elements.
A088809 and A364756 count subsets with some sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Rest[Subsets[Range[n]]],combp[Last[#],Union[Most[#]]]!={}&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365043(n):
        mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
        return sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023

Formula

a(n) = 2^n - A365044(n).

Extensions

a(15)-a(35) from Chai Wah Wu, Nov 20 2023
More terms from Bert Dobbelaere, Apr 28 2025

A365045 Number of subsets of {1..n} containing n such that no element can be written as a positive linear combination of the others.

Original entry on oeis.org

0, 1, 1, 2, 4, 11, 23, 53, 111, 235, 483, 988, 1998, 4036, 8114, 16289, 32645, 65389, 130887, 261923, 524014, 1048251, 2096753, 4193832, 8388034, 16776544, 33553622, 67107919, 134216597, 268434140, 536869355, 1073740012, 2147481511, 4294964834, 8589931700
Offset: 0

Views

Author

Gus Wiseman, Aug 24 2023

Keywords

Comments

Also subsets of {1..n} containing n whose greatest element cannot be written as a positive linear combination of the others.

Examples

			The subset {3,4,10} has 10 = 2*3 + 1*4 so is not counted under a(10).
The a(0) = 0 through a(5) = 11 subsets:
  .  {1}  {2}  {3}    {4}        {5}
               {2,3}  {3,4}      {2,5}
                      {2,3,4}    {3,5}
                      {1,2,3,4}  {4,5}
                                 {2,4,5}
                                 {3,4,5}
                                 {1,2,3,5}
                                 {1,2,4,5}
                                 {1,3,4,5}
                                 {2,3,4,5}
                                 {1,2,3,4,5}
		

Crossrefs

The nonempty case is A070880.
The nonnegative version is A124506, first differences of A326083.
The binary version is A288728, first differences of A007865.
A subclass is A341507.
The complement is counted by A365042, first differences of A365043.
First differences of A365044.
The nonnegative complement is A365046, first differences of A364914.
The binary complement is A365070, first differences of A093971.
Without re-usable parts we have A365071, first differences of A151897.
A085489 and A364755 count subsets w/o the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&And@@Table[combp[#[[k]],Union[Delete[#,k]]]=={},{k,Length[#]}]&]],{n,0,10}]

Formula

a(n) = A070880(n) + 1 for n > 0.

A365044 Number of subsets of {1..n} whose greatest element cannot be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

1, 2, 3, 5, 9, 20, 43, 96, 207, 442, 925, 1913, 3911, 7947, 16061, 32350, 64995, 130384, 261271, 523194, 1047208, 2095459, 4192212, 8386044, 16774078, 33550622, 67104244, 134212163, 268428760, 536862900, 1073732255, 2147472267, 4294953778, 8589918612, 17179850312
Offset: 0

Views

Author

Gus Wiseman, Aug 26 2023

Keywords

Comments

Sets of this type may be called "positive combination-free".
Also subsets of {1..n} such that no element can be written as a (strictly) positive linear combination of the others.

Examples

			The subset S = {3,5,6,8} has 6 = 2*3 + 0*5 + 0*8 and 8 = 1*3 + 1*5 + 0*6 but neither of these is strictly positive, so S is counted under a(8).
The a(0) = 1 through a(5) = 20 subsets:
  {}  {}   {}   {}     {}         {}
      {1}  {1}  {1}    {1}        {1}
           {2}  {2}    {2}        {2}
                {3}    {3}        {3}
                {2,3}  {4}        {4}
                       {2,3}      {5}
                       {3,4}      {2,3}
                       {2,3,4}    {2,5}
                       {1,2,3,4}  {3,4}
                                  {3,5}
                                  {4,5}
                                  {2,3,4}
                                  {2,4,5}
                                  {3,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

The binary version is A007865, first differences A288728.
The binary complement is A093971, first differences A365070.
Without re-usable parts we have A151897, first differences A365071.
The nonnegative version is A326083, first differences A124506.
A subclass is A341507.
The nonnegative complement is A364914, first differences A365046.
The complement is counted by A365043, first differences A365042.
First differences are A365045.
A085489 and A364755 count subsets w/o the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],And@@Table[combp[Last[#],Union[Most[#]]]=={},{k,Length[#]}]&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365044(n):
        mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
        return n+1+sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] not in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023

Formula

a(n) = 2^n - A365043(n).

Extensions

a(15)-a(34) from Chai Wah Wu, Nov 20 2023

A045691 Number of binary words of length n with autocorrelation function 2^(n-1)+1.

Original entry on oeis.org

0, 1, 1, 3, 5, 11, 19, 41, 77, 159, 307, 625, 1231, 2481, 4921, 9883, 19689, 39455, 78751, 157661, 315015, 630337, 1260049, 2520723, 5040215, 10081661, 20160841, 40324163, 80643405, 161291731, 322573579, 645157041, 1290294393, 2580608475, 5161177495
Offset: 0

Views

Author

Torsten Sillke (torsten.sillke(AT)lhsystems.com)

Keywords

Comments

From Gus Wiseman, Jan 22 2022: (Start)
Also the number of subsets of {1..n} containing n but without adjacent elements of quotient 1/2. The Heinz numbers of these sets are a subset of the squarefree terms of A320340. For example, the a(1) = 1 through a(6) = 19 subsets are:
{1} {2} {3} {4} {5} {6}
{1,3} {1,4} {1,5} {1,6}
{2,3} {3,4} {2,5} {2,6}
{1,3,4} {3,5} {4,6}
{2,3,4} {4,5} {5,6}
{1,3,5} {1,4,6}
{1,4,5} {1,5,6}
{2,3,5} {2,5,6}
{3,4,5} {3,4,6}
{1,3,4,5} {3,5,6}
{2,3,4,5} {4,5,6}
{1,3,4,6}
{1,3,5,6}
{1,4,5,6}
{2,3,4,6}
{2,3,5,6}
{3,4,5,6}
{1,3,4,5,6}
{2,3,4,5,6}
(End)

Crossrefs

If a(n) counts subsets of {1..n} with n and without adjacent quotients 1/2:
- The version with quotients <= 1/2 is A018819, partitions A000929.
- The version with quotients < 1/2 is A040039, partitions A342098.
- The version with quotients >= 1/2 is A045690(n+1), partitions A342094.
- The version with quotients > 1/2 is A045690, partitions A342096.
- Partitions of this type are counted by A350837, ranked by A350838.
- Strict partitions of this type are counted by A350840.
- For differences instead of quotients we have A350842, strict A350844.
- Partitions not of this type are counted by A350846, ranked by A350845.
A000740 = relatively prime subsets of {1..n} containing n.
A002843 = compositions with all adjacent quotients >= 1/2.
A050291 = double-free subsets of {1..n}.
A154402 = partitions with all adjacent quotients 2.
A308546 = double-closed subsets of {1..n}, with maximum: shifted right.
A323092 = double-free integer partitions, ranked by A320340, strict A120641.
A326115 = maximal double-free subsets of {1..n}.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&And@@Table[#[[i-1]]/#[[i]]!=1/2,{i,2,Length[#]}]&]],{n,0,15}] (* Gus Wiseman, Jan 22 2022 *)

Formula

a(2*n-1) = 2*a(2*n-2) - a(n) for n >= 2; a(2*n) = 2*a(2*n-1) + a(n) for n >= 2.

Extensions

More terms from Sean A. Irvine, Mar 18 2021

A365042 Number of subsets of {1..n} containing n such that some element can be written as a positive linear combination of the others.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 9, 11, 17, 21, 29, 36, 50, 60, 78, 95, 123, 147, 185, 221, 274, 325, 399, 472, 574, 672, 810, 945, 1131, 1316, 1557, 1812, 2137, 2462, 2892, 3322, 3881, 4460, 5176, 5916, 6846, 7817, 8993, 10250, 11765, 13333, 15280, 17308, 19731, 22306
Offset: 0

Views

Author

Gus Wiseman, Aug 23 2023

Keywords

Comments

Sets of this type may be called "positive combination-full".
Also subsets of {1..n} containing n whose greatest element can be written as a positive linear combination of the others.

Examples

			The subset {3,4,10} has 10 = 2*3 + 1*4 so is counted under a(10).
The a(0) = 0 through a(7) = 11 subsets:
  .  .  {1,2}  {1,3}    {1,4}    {1,5}    {1,6}      {1,7}
               {1,2,3}  {2,4}    {1,2,5}  {2,6}      {1,2,7}
                        {1,2,4}  {1,3,5}  {3,6}      {1,3,7}
                        {1,3,4}  {1,4,5}  {1,2,6}    {1,4,7}
                                 {2,3,5}  {1,3,6}    {1,5,7}
                                          {1,4,6}    {1,6,7}
                                          {1,5,6}    {2,3,7}
                                          {2,4,6}    {2,5,7}
                                          {1,2,3,6}  {3,4,7}
                                                     {1,2,3,7}
                                                     {1,2,4,7}
		

Crossrefs

The nonnegative complement is A124506, first differences of A326083.
The binary complement is A288728, first differences of A007865.
First differences of A365043.
The complement is counted by A365045, first differences of A365044.
The nonnegative version is A365046, first differences of A364914.
Without re-usable parts we have A365069, first differences of A364534.
The binary version is A365070, first differences of A093971.
A085489 and A364755 count subsets with no sum of two distinct elements.
A088314 counts sets that can be linearly combined to obtain n.
A088809 and A364756 count subsets with some sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Or@@Table[combp[#[[k]],Union[Delete[#,k]]]!={},{k,Length[#]}]&]],{n,0,10}]

Formula

a(n) = A088314(n) - 1.

A326115 Number of maximal double-free subsets of {1..n}.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 4, 4, 6, 6, 12, 12, 12, 12, 24, 24, 32, 32, 64, 64, 64, 64, 128, 128, 192, 192, 384, 384, 384, 384, 768, 768, 960, 960, 1920, 1920, 1920, 1920, 3840, 3840, 5760, 5760, 11520, 11520, 11520, 11520, 23040, 23040, 30720, 30720
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2019

Keywords

Comments

A set is double-free if no element is twice any other element.

Examples

			The a(1) = 1 through a(9) = 6 sets:
  {1}  {1}  {13}  {23}   {235}   {235}   {2357}   {13457}  {134579}
       {2}  {23}  {134}  {1345}  {256}   {2567}   {13578}  {135789}
                                 {1345}  {13457}  {14567}  {145679}
                                 {1456}  {14567}  {15678}  {156789}
                                                  {23578}  {235789}
                                                  {25678}  {256789}
		

Crossrefs

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],Intersection[#,2*#]=={}&]]],{n,0,10}]

Formula

From Charlie Neder, Jun 11 2019: (Start)
a(n) = Product {k < n/2} A000931(8+floor(log_2(n/(2k+1)))).
a(2k+1) = a(2k), a(8k+4) = a(8k+3). (End)

Extensions

a(16)-a(49) from Charlie Neder, Jun 11 2019

A358392 Number of nonempty subsets of {1, 2, ..., n} with GCD equal to 1 and containing the sum of any two elements whenever it is at most n.

Original entry on oeis.org

1, 1, 2, 3, 7, 9, 19, 27, 46, 63, 113, 148, 253, 345, 539, 734, 1198, 1580, 2540, 3417, 5233, 7095, 11190, 14720, 22988, 31057, 47168, 63331, 98233, 129836, 200689, 269165, 406504, 546700, 838766, 1108583, 1700025, 2281517, 3437422, 4597833, 7023543, 9308824, 14198257, 18982014, 28556962
Offset: 1

Views

Author

Max Alekseyev, Nov 13 2022

Keywords

Comments

Also, the number of distinct numerical semigroups that are generated by some subset of {1, 2, ..., n} and have a finite complement in the positive integers.

Crossrefs

Formula

a(n) = Sum_{k=1..n} moebius(k) * A103580(floor(n/k)).

A356639 Number of integer sequences b with b(1) = 1, b(m) > 0 and b(m+1) - b(m) > 0, of length n which transform under the map S into a nonnegative integer sequence. The transform c = S(b) is defined by c(m) = Product_{k=1..m} b(k) / Product_{k=2..m} (b(k) - b(k-1)).

Original entry on oeis.org

1, 1, 3, 17, 155, 2677, 73327, 3578339, 329652351
Offset: 1

Views

Author

Thomas Scheuerle, Aug 19 2022

Keywords

Comments

This sequence can be calculated by a recursive algorithm:
Let B1 be an array of finite length, the "1" denotes that it is the first generation. Let B1' be the reversed version of B1. Let C be the element-wise product C = B1 * B1'. Then B2 is a concatenation of taking each element of B1 and add all divisors of the corresponding element in C. If we start with B1 = {1} then we get this sequence of arrays: B2 = {2}, B3 = {3, 4, 6}, ... . a(n) is the length of the array Bn. In short the length of Bn+1 and so a(n+1) is the sum over A000005(Bn * Bn').
The transform used in the definition of this sequence is its own inverse, so if c = S(b) then b = S(c). The eigensequence is 2^n = S(2^n).
There exist some transformation pairs of infinite sequences in the database:
A026549 <--> A038754; A100071 <--> A001405; A058295 <--> A------;
A111286 <--> A098011; A093968 <--> A205825; A166447 <--> A------;
A079352 <--> A------; A082458 <--> A------; A008233 <--> A264635;
A138278 <--> A------; A006501 <--> A264557; A336496 <--> A------;
A019464 <--> A------; A062112 <--> A------; A171647 <--> A359039;
A279312 <--> A------; A031923 <--> A------.
These transformation pairs are conjectured:
A137326 <--> A------; A066332 <--> A300902; A208147 <--> A308546;
A057895 <--> A------; A349080 <--> A------; A019442 <--> A------;
A349079 <--> A------.
("A------" means not yet in the database.)
Some sequences in the lists above may need offset adjustment to force a beginning with 1,2,... in the transformation.
If we allowed signed rational numbers, further interesting transformation pairs could be observed. For example, 1/n will transform into factorials with alternating sign. 2^(-n) transforms into ones with alternating sign and 1/A000045(n) into A000045 with alternating sign.

Examples

			a(4) = 17. The 17 transformation pairs of length 4 are:
  {1, 2, 3, 4}  = S({1, 2, 6, 24}).
  {1, 2, 3, 5}  = S({1, 2, 6, 15}).
  {1, 2, 3, 6}  = S({1, 2, 6, 12}).
  {1, 2, 3, 9}  = S({1, 2, 6, 9}).
  {1, 2, 3, 12} = S({1, 2, 6, 8}).
  {1, 2, 3, 21} = S({1, 2, 6, 7}).
  {1, 2, 4, 5}  = S({1, 2, 4, 20}).
  {1, 2, 4, 6}  = S({1, 2, 4, 12}).
  {1, 2, 4, 8}  = S({1, 2, 4, 8}).
  {1, 2, 4, 12} = S({1, 2, 4, 6}).
  {1, 2, 4, 20} = S({1, 2, 4, 5}).
  {1, 2, 6, 7}  = S({1, 2, 3, 21}).
  {1, 2, 6, 8}  = S({1, 2, 3, 12}).
  {1, 2, 6, 9}  = S({1, 2, 3, 9}).
  {1, 2, 6, 12} = S({1, 2, 3, 6}).
  {1, 2, 6, 15} = S({1, 2, 3, 5}).
  {1, 2, 6, 24} = S({1, 2, 3, 4}).
b(1) = 1 by definition, b(2) = 1+1 as 1 has only 1 as divisor.
a(3) = A000005(b(2)*b(2)) = 3.
The divisors of b(2) are 1,2,4. So b(3) can be b(2)+1, b(2)+2 and b(2)+4.
a(4) = A000005((b(2)+1)*(b(2)+4)) + A000005((b(2)+2)*(b(2)+2)) + A000005((b(2)+4)*(b(2)+1)) = 17.
		

Crossrefs

Previous Showing 11-18 of 18 results.