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

A326076 Number of subsets of {1..n} containing all of their integer products <= n.

Original entry on oeis.org

1, 2, 4, 8, 12, 24, 44, 88, 152, 232, 444, 888, 1576, 3152, 6136, 11480, 17112, 34224, 63504, 127008, 232352, 442208, 876944, 1753888, 3138848, 4895328, 9739152, 18141840, 34044720, 68089440, 123846624, 247693248, 469397440, 924014144, 1845676384, 3469128224, 5182711584
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

The strict case is A326081.

Examples

			The a(0) = 1 through a(4) = 12 sets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {3}
           {1,2}  {3}      {4}
                  {1,2}    {1,3}
                  {1,3}    {1,4}
                  {2,3}    {2,4}
                  {1,2,3}  {3,4}
                           {1,2,4}
                           {1,3,4}
                           {2,3,4}
                           {1,2,3,4}
The a(6) = 44 sets:
  {}  {1}  {1,3}  {1,2,4}  {1,2,4,5}  {1,2,3,4,6}  {1,2,3,4,5,6}
      {3}  {1,4}  {1,3,4}  {1,2,4,6}  {1,2,4,5,6}
      {4}  {1,5}  {1,3,5}  {1,3,4,5}  {1,3,4,5,6}
      {5}  {1,6}  {1,3,6}  {1,3,4,6}  {2,3,4,5,6}
      {6}  {2,4}  {1,4,5}  {1,3,5,6}
           {3,4}  {1,4,6}  {1,4,5,6}
           {3,5}  {1,5,6}  {2,3,4,6}
           {3,6}  {2,4,5}  {2,4,5,6}
           {4,5}  {2,4,6}  {3,4,5,6}
           {4,6}  {3,4,5}
           {5,6}  {3,4,6}
                  {3,5,6}
                  {4,5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Select[Times@@@Tuples[#,2],#<=n&]]&]],{n,0,10}]
  • PARI
    a(n)={
        my(lim=vector(n, k, sqrtint(k)));
        my(accept(b, k)=for(i=2, lim[k], if(k%i ==0 && bittest(b, i) && bittest(b, k/i), return(0))); 1);
        my(recurse(k, b)=
          my(m=1);
          for(j=max(2*k, n\2+1), min(2*k+1, n), if(accept(b, j), m*=2));
          k++;
          m*if(k > n\2, 1, self()(k, b + (1<Andrew Howroyd, Aug 30 2019

Formula

a(n) = 2*A326114(n) for n > 0. - Andrew Howroyd, Aug 30 2019

Extensions

a(16)-a(30) from Andrew Howroyd, Aug 16 2019
Terms a(31) and beyond from Andrew Howroyd, Aug 30 2019

A326117 Number of subsets of {1..n} containing no products of two or more distinct elements.

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 29, 57, 101, 201, 365, 729, 1233, 2465, 4593, 8297, 15921, 31841, 55953, 111905, 195713, 362337, 697361, 1394721, 2334113, 4668225, 9095393, 17225313, 31242785, 62485569, 106668609, 213337217, 392606529, 755131841, 1491146913, 2727555425, 4947175713
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2019

Keywords

Comments

If this sequence counts product-free sets, A326081 counts product-closed sets.

Examples

			The a(6) = 28 sets:
  {}  {1}  {2,3}  {2,3,4}  {2,3,4,5}
      {2}  {2,4}  {2,3,5}  {2,4,5,6}
      {3}  {2,5}  {2,4,5}  {3,4,5,6}
      {4}  {2,6}  {2,4,6}
      {5}  {3,4}  {2,5,6}
      {6}  {3,5}  {3,4,5}
           {3,6}  {3,4,6}
           {4,5}  {3,5,6}
           {4,6}  {4,5,6}
           {5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Select[Times@@@Subsets[#,{2}],#<=n&]]=={}&]],{n,0,20}]

Formula

For n > 0, a(n) = A326116(n) + 1.

Extensions

Terms a(21)-a(36) from Andrew Howroyd, Aug 30 2019

A326023 Number of subsets of {1..n} containing all of their integer quotients.

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 25, 49, 73, 145, 217, 433, 553, 1105, 1657, 2593, 3937, 7873, 10057, 20113, 26689, 42321, 63481, 126961, 154801, 309601, 464401, 737569, 992161, 1984321, 2450881, 4901761, 6292801, 10197313, 15295969, 26241697, 32947489, 65894977, 98842465, 161587873, 205842529
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

These are sets that are closed under taking the quotient of two (not necessarily distinct) divisible terms.

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Select[Divide@@@Tuples[#,2],IntegerQ]]&]],{n,0,10}]

Formula

For n > 0, a(n) = A326078(n) + 1.

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 30 2019

A320426 Number of nonempty pairwise coprime subsets of {1,...,n}, where a single number is not considered to be pairwise coprime unless it is equal to 1.

Original entry on oeis.org

1, 2, 5, 8, 19, 22, 49, 64, 95, 106, 221, 236, 483, 530, 601, 712, 1439, 1502, 3021, 3212, 3595, 3850, 7721, 7976, 11143, 11878, 14629, 15460, 30947, 31202, 62433, 69856, 76127, 80222, 89821, 91612, 183259, 192602, 208601, 214232, 428503, 431574, 863189
Offset: 1

Views

Author

Gus Wiseman, Jan 08 2019

Keywords

Comments

Two or more numbers are pairwise coprime if no pair of them has a common divisor > 1.

Examples

			The a(4) = 8 subsets of {1,2,3,4} are {1}, {1,2}, {1,3}, {1,4}, {2,3}, {3,4}, {1,2,3}, {1,3,4}. - _Michael B. Porter_, Jan 12 2019
From _Gus Wiseman_, May 09 2021: (Start)
The a(2) = 2 through a(6) = 22 sets:
   {1}     {1}      {1}       {1}        {1}
  {1,2}   {1,2}    {1,2}     {1,2}      {1,2}
          {1,3}    {1,3}     {1,3}      {1,3}
          {2,3}    {1,4}     {1,4}      {1,4}
         {1,2,3}   {2,3}     {1,5}      {1,5}
                   {3,4}     {2,3}      {1,6}
                  {1,2,3}    {2,5}      {2,3}
                  {1,3,4}    {3,4}      {2,5}
                             {3,5}      {3,4}
                             {4,5}      {3,5}
                            {1,2,3}     {4,5}
                            {1,2,5}     {5,6}
                            {1,3,4}    {1,2,3}
                            {1,3,5}    {1,2,5}
                            {1,4,5}    {1,3,4}
                            {2,3,5}    {1,3,5}
                            {3,4,5}    {1,4,5}
                           {1,2,3,5}   {1,5,6}
                           {1,3,4,5}   {2,3,5}
                                       {3,4,5}
                                      {1,2,3,5}
                                      {1,3,4,5}
(End)
		

Crossrefs

The case of pairs is A015614.
The case with singletons is A187106.
The version without singletons (except {1}) is A276187.
Row sums of A320436.
The version for divisors > 1 is A343654.
The version for divisors without singletons is A343655.
The maximal version is A343659.
A018892 counts coprime unordered pairs of divisors.
A051026 counts pairwise indivisible subsets of {1...n}.
A087087 ranks pairwise coprime subsets of {1...n}.
A326675 ranks pairwise coprime non-singleton subsets of {1...n}.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],CoprimeQ@@#&]],{n,10}]

Formula

a(n) = A187106(n) - n + 1 = A084422(n) - n.
a(n) = A276187(n) + 1. - Gus Wiseman, May 08 2021

Extensions

a(25)-a(43) from Alois P. Heinz, Jan 08 2019

A087086 Primitive sets of integers, each subset mapped onto a unique binary integer, values here shown in decimal.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 16, 18, 20, 22, 24, 28, 32, 40, 48, 56, 64, 66, 68, 70, 72, 76, 80, 82, 84, 86, 88, 92, 96, 104, 112, 120, 128, 132, 144, 148, 160, 176, 192, 196, 208, 212, 224, 240, 256, 258, 264, 272, 274, 280, 288, 296, 304, 312, 320, 322, 328, 336, 338, 344
Offset: 0

Views

Author

Alan Sutcliffe (alansut(AT)ntlworld.com), Aug 14 2003

Keywords

Comments

A primitive set of integers has no pair of elements one of which divides the other. Each element i in a subset contributes 2^(i-1) to the binary value for that subset. The integers missing from the sequence correspond to nonprimitive subsets.

Examples

			a(10)=22 since the 10th primitive set counting from 0 is {5,3,2}, which maps onto 10110 binary = 22 decimal.
From _Gus Wiseman_, Oct 31 2019: (Start)
The sequence of terms together with their binary expansions and binary indices begins:
   0:       0 ~ {}
   1:       1 ~ {1}
   2:      10 ~ {2}
   4:     100 ~ {3}
   6:     110 ~ {2,3}
   8:    1000 ~ {4}
  12:    1100 ~ {3,4}
  16:   10000 ~ {5}
  18:   10010 ~ {2,5}
  20:   10100 ~ {3,5}
  22:   10110 ~ {2,3,5}
  24:   11000 ~ {4,5}
  28:   11100 ~ {3,4,5}
(End)
		

References

  • Alan Sutcliffe, Divisors and Common Factors in Sets of Integers, awaiting publication

Crossrefs

A051026 gives the number of primitive subsets of the integers 1 to n.
The version for prime indices (rather than binary indices) is A316476.
The relatively prime case is A328671.
Partitions with no consecutive divisible parts are A328171.
Compositions without consecutive divisible parts are A328460.
A ranking of antichains is A326704.

Programs

  • Mathematica
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Select[Range[0,100],stableQ[Join@@Position[Reverse[IntegerDigits[#,2]],1],Divisible]&] (* Gus Wiseman, Oct 31 2019 *)

A364756 Number of subsets of {1..n} containing n and some element equal to the sum of two distinct others.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 17, 40, 87, 196, 413, 875, 1812, 3741, 7640, 15567, 31493, 63666, 128284, 257977, 518045, 1039478, 2083719, 4174586, 8359837, 16735079, 33493780, 67020261, 134090173, 268250256, 536609131, 1073358893, 2146942626, 4294183434, 8588837984, 17178273355
Offset: 0

Views

Author

Gus Wiseman, Aug 11 2023

Keywords

Examples

			The subset S = {1,3,6,8} has pair-sums {4,7,9,11,14}, which are disjoint from S, so it is not counted under a(8).
The subset {2,3,4,6} has pair-sum 2 + 4 = 6, so is counted under a(6).
The a(0) = 0 through a(6) = 17 subsets:
  .  .  .  {1,2,3}  {1,3,4}    {1,4,5}      {1,5,6}
                    {1,2,3,4}  {2,3,5}      {2,4,6}
                               {1,2,3,5}    {1,2,3,6}
                               {1,2,4,5}    {1,2,4,6}
                               {1,3,4,5}    {1,2,5,6}
                               {2,3,4,5}    {1,3,4,6}
                               {1,2,3,4,5}  {1,3,5,6}
                                            {1,4,5,6}
                                            {2,3,4,6}
                                            {2,3,5,6}
                                            {2,4,5,6}
                                            {1,2,3,4,6}
                                            {1,2,3,5,6}
                                            {1,2,4,5,6}
                                            {1,3,4,5,6}
                                            {2,3,4,5,6}
                                            {1,2,3,4,5,6}
		

Crossrefs

Partial sums are A088809, non-binary A364534.
With re-usable parts we have differences of A093971, complement A288728.
The complement with n is counted by A364755, partial sums A085489(n) - 1.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Intersection[#,Total/@Subsets[#,{2}]]!={}&]],{n,0,10}]

Formula

First differences of A088809.

Extensions

a(16) onwards added (using A088809) by Andrew Howroyd, Jan 13 2024

A343652 Number of maximal pairwise coprime sets of divisors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 2, 2, 2, 8, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 8, 2, 4, 2, 4, 1, 6, 2, 6, 2, 2, 1, 10, 1, 2, 4, 6, 2, 5, 1, 4, 2, 5, 1, 12, 1, 2, 4, 4, 2, 5, 1, 8, 4, 2, 1, 10, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Apr 25 2021

Keywords

Comments

Also the number of maximal pairwise coprime sets of divisors > 1 of n. For example, the a(n) sets for n = 12, 30, 36, 60, 120 are:
{6} {30} {6} {30} {30}
{12} {2,15} {12} {60} {60}
{2,3} {3,10} {18} {2,15} {120}
{3,4} {5,6} {36} {3,10} {2,15}
{2,3,5} {2,3} {3,20} {3,10}
{2,9} {4,15} {3,20}
{3,4} {5,6} {3,40}
{4,9} {5,12} {4,15}
{2,3,5} {5,6}
{3,4,5} {5,12}
{5,24}
{8,15}
{2,3,5}
{3,4,5}
{3,5,8}

Examples

			The a(n) sets for n = 12, 30, 36, 60, 120:
  {1,6}    {1,30}     {1,6}    {1,30}     {1,30}
  {1,12}   {1,2,15}   {1,12}   {1,60}     {1,60}
  {1,2,3}  {1,3,10}   {1,18}   {1,2,15}   {1,120}
  {1,3,4}  {1,5,6}    {1,36}   {1,3,10}   {1,2,15}
           {1,2,3,5}  {1,2,3}  {1,3,20}   {1,3,10}
                      {1,2,9}  {1,4,15}   {1,3,20}
                      {1,3,4}  {1,5,6}    {1,3,40}
                      {1,4,9}  {1,5,12}   {1,4,15}
                               {1,2,3,5}  {1,5,6}
                               {1,3,4,5}  {1,5,12}
                                          {1,5,24}
                                          {1,8,15}
                                          {1,2,3,5}
                                          {1,3,4,5}
                                          {1,3,5,8}
		

Crossrefs

The case of pairs is A063647.
The case of triples is A066620.
The non-maximal version counting empty sets and singletons is A225520.
The non-maximal version with no 1's is A343653.
The non-maximal version is A343655.
The version for subsets of {1..n} is A343659.
The case without 1's or singletons is A343660.
A018892 counts pairwise coprime unordered pairs of divisors.
A048691 counts pairwise coprime ordered pairs of divisors.
A048785 counts pairwise coprime ordered triples of divisors.
A084422, A187106, A276187, and A320426 count pairwise coprime sets.
A100565 counts pairwise coprime unordered triples of divisors.
A305713 counts pairwise coprime non-singleton strict partitions.
A324837 counts minimal subsets of {1...n} with least common multiple n.
A325683 counts maximal Golomb rulers.
A326077 counts maximal pairwise indivisible sets.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@Most@*Subsets/@y];
    Table[Length[fasmax[Select[Subsets[Divisors[n]],CoprimeQ@@#&]]],{n,100}]

Formula

a(n) = A343660(n) + A005361(n).

A326489 Number of product-free subsets of {1..n}.

Original entry on oeis.org

1, 1, 2, 4, 6, 12, 22, 44, 88, 136, 252, 504, 896, 1792, 3392, 6352, 9720, 19440, 35664, 71328, 129952, 247232, 477664, 955328, 1700416, 2657280, 5184000, 10368000, 19407360, 38814720, 68868352, 137736704, 260693504, 505830400, 999641600, 1882820608, 2807196672
Offset: 0

Views

Author

Gus Wiseman, Jul 09 2019

Keywords

Comments

A set is product-free if it contains no product of two (not necessarily distinct) elements.

Examples

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

Crossrefs

Product-closed subsets are A326076.
Subsets containing no products are A326114.
Subsets containing no products of distinct elements are A326117.
Subsets containing no quotients are A327591.
Maximal product-free subsets are A326496.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Times@@@Tuples[#,2]]=={}&]],{n,10}]

Extensions

a(21)-a(36) from Andrew Howroyd, Aug 25 2019
a(0)=1 prepended to data, example and b-file by Peter Kagey, Sep 18 2019

A326496 Number of maximal product-free subsets of {1..n}.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 6, 6, 9, 9, 15, 17, 30, 30, 46, 46, 51, 61, 103, 103, 129, 158, 282, 282, 322, 322, 553, 553, 615, 689, 1247, 1365, 1870, 1870, 3566, 3758, 5244, 5244, 8677, 8677, 9807, 12147, 23351, 23351, 27469, 31694, 45718, 47186, 54594, 54594, 95382, 108198
Offset: 0

Views

Author

Gus Wiseman, Jul 09 2019

Keywords

Comments

A set is product-free if it contains no product of two (not necessarily distinct) elements.
Also the number of maximal quotient-free subsets of {1..n}.

Examples

			The a(2) = 1 through a(10) = 6 subsets (A = 10):
  {2}  {23}  {23}  {235}  {235}   {2357}   {23578}   {23578}   {23578}
             {34}  {345}  {256}   {2567}   {25678}   {256789}  {2378A}
                          {3456}  {34567}  {345678}  {345678}  {256789}
                                                     {456789}  {26789A}
                                                               {345678A}
                                                               {456789A}
		

Crossrefs

Product-free subsets are A326489.
Subsets without products of distinct elements are A326117.
Maximal sum-free subsets are A121269.
Maximal sum-free and product-free subsets are A326497.
Maximal subsets without products of distinct elements are A325710.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],Intersection[#,Times@@@Tuples[#,2]]=={}&]]],{n,0,10}]
  • PARI
    \\ See link for program file.
    for(n=0, 30, print1(A326496(n), ", ")) \\ Andrew Howroyd, Aug 30 2019

Extensions

a(18)-a(55) from Andrew Howroyd, Aug 30 2019

A276187 Number of subsets of {1,..,n} of cardinality >= 2 such that the elements of each counted subset are pairwise coprime.

Original entry on oeis.org

0, 1, 4, 7, 18, 21, 48, 63, 94, 105, 220, 235, 482, 529, 600, 711, 1438, 1501, 3020, 3211, 3594, 3849, 7720, 7975, 11142, 11877, 14628, 15459, 30946, 31201, 62432, 69855, 76126, 80221, 89820, 91611, 183258, 192601, 208600, 214231, 428502, 431573, 863188, 900563
Offset: 1

Views

Author

Robert C. Lyons, Aug 23 2016

Keywords

Comments

n is prime if and only if a(n) = 2*a(n-1)+n-1. - Robert Israel, Aug 24 2016

Examples

			From _Gus Wiseman_, May 08 2021: (Start)
The a(2) = 1 through a(6) = 21 sets:
  {1,2}   {1,2}    {1,2}     {1,2}      {1,2}
          {1,3}    {1,3}     {1,3}      {1,3}
          {2,3}    {1,4}     {1,4}      {1,4}
         {1,2,3}   {2,3}     {1,5}      {1,5}
                   {3,4}     {2,3}      {1,6}
                  {1,2,3}    {2,5}      {2,3}
                  {1,3,4}    {3,4}      {2,5}
                             {3,5}      {3,4}
                             {4,5}      {3,5}
                            {1,2,3}     {4,5}
                            {1,2,5}     {5,6}
                            {1,3,4}    {1,2,3}
                            {1,3,5}    {1,2,5}
                            {1,4,5}    {1,3,4}
                            {2,3,5}    {1,3,5}
                            {3,4,5}    {1,4,5}
                           {1,2,3,5}   {1,5,6}
                           {1,3,4,5}   {2,3,5}
                                       {3,4,5}
                                      {1,2,3,5}
                                      {1,3,4,5}
(End)
		

Crossrefs

The case of pairs is A015614.
The indivisible instead of coprime version is A051026(n) - n.
Allowing empty sets and singletons gives A084422.
The relatively prime instead of pairwise coprime version is A085945(n) - 1.
Allowing all singletons gives A187106.
Allowing only the singleton {1} gives A320426.
Row sums of A320436, each minus one.
The maximal case is counted by A343659.
The version for sets of divisors is A343655(n) - 1.
A000005 counts divisors.
A186972 counts pairwise coprime k-sets containing n.
A186974 counts pairwise coprime k-sets.
A326675 ranks pairwise coprime non-singleton sets.

Programs

  • Maple
    f:= proc(S) option remember;
        local s, Sp;
        if S = {} then return 1 fi;
        s:= S[-1];
        Sp:= S[1..-2];
        procname(Sp) + procname(select(t -> igcd(t,s)=1, Sp))
    end proc:
    seq(f({$1..n}) - n - 1, n=1..50); # Robert Israel, Aug 24 2016
  • Mathematica
    f[S_] := f[S] = Module[{s, Sp}, If[S == {}, Return[1]]; s = S[[-1]]; Sp = S[[1;;-2]]; f[Sp] + f[Select[Sp, GCD[#, s] == 1&]]];
    Table[f[Range[n]] - n - 1, {n, 1, 50}] (* Jean-François Alcover, Sep 15 2022, after Robert Israel *)
  • PARI
    f(n,k=1)=if(n==1, return(2)); if(gcd(k,n)==1, f(n-1,n*k)) + f(n-1,k)
    a(n)=f(n)-n-1 \\ Charles R Greathouse IV, Aug 24 2016
  • Sage
    from sage.combinat.subsets_pairwise import PairwiseCompatibleSubsets
    def is_coprime(x, y): return gcd(x, y) == 1
    max_n = 40
    seq = []
    for n in range(1, max_n+1):
        P = PairwiseCompatibleSubsets(range(1,n+1), is_coprime)
        a_n = len([1 for s in P.list() if len(s) > 1])
        seq.append(a_n)
    print(seq)
    

Formula

a(n) = A320426(n) - 1. - Gus Wiseman, May 08 2021

Extensions

Name and example edited by Robert Israel, Aug 24 2016
Previous Showing 11-20 of 50 results. Next