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-10 of 14 results. Next

A007360 Number of partitions of n into distinct and pairwise relatively prime parts.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 8, 9, 10, 11, 10, 13, 17, 19, 21, 22, 21, 24, 32, 37, 37, 38, 40, 45, 55, 65, 69, 66, 64, 75, 86, 100, 113, 107, 106, 122, 145, 165, 174, 167, 162, 179, 222, 253, 255, 255, 255, 273, 328, 373, 376, 369, 377, 406, 476, 553, 569, 537, 529
Offset: 1

Views

Author

N. J. A. Sloane and Mira Bernstein, following a suggestion from Marc LeBrun

Keywords

Examples

			From _Gus Wiseman_, Sep 23 2019: (Start)
The a(1) = 1 through a(10) = 6 partitions (A = 10):
  (1)  (2)  (3)   (4)   (5)   (6)    (7)   (8)    (9)    (A)
            (21)  (31)  (32)  (51)   (43)  (53)   (54)   (73)
                        (41)  (321)  (52)  (71)   (72)   (91)
                                     (61)  (431)  (81)   (532)
                                           (521)  (531)  (541)
                                                         (721)
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Number of partitions of n into relatively prime parts = A000837.
The non-strict case is A051424.
Strict relatively prime partitions are A078374.

Programs

  • Mathematica
    $RecursionLimit = 1000; b[n_, i_, s_] := b[n, i, s] = Module[{f}, If[n == 0 || i == 1, 1, If[i<2, 0, f = FactorInteger[i][[All, 1]]; b[n, i-1, Select[s, #Jean-François Alcover, Mar 20 2014, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[#]==1||UnsameQ@@#&&CoprimeQ@@Union[#]&]],{n,0,30}] (* Gus Wiseman, Sep 23 2019 *)

Formula

a(n) = A051424(n)-A051424(n-2). - Vladeta Jovovic, Dec 11 2004

Extensions

More precise definition from Vladeta Jovovic, Dec 11 2004
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Nov 13 2005

A186974 Irregular triangle T(n,k), n>=1, 1<=k<=A036234(n), read by rows: T(n,k) is the number of k-element subsets of {1, 2, ..., n} having pairwise coprime elements.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 5, 2, 5, 9, 7, 2, 6, 11, 8, 2, 7, 17, 19, 10, 2, 8, 21, 25, 14, 3, 9, 27, 37, 24, 6, 10, 31, 42, 26, 6, 11, 41, 73, 68, 32, 6, 12, 45, 79, 72, 33, 6, 13, 57, 124, 151, 105, 39, 6, 14, 63, 138, 167, 114, 41, 6, 15, 71, 159, 192, 128, 44, 6
Offset: 1

Views

Author

Alois P. Heinz, Mar 02 2011

Keywords

Comments

T(n,k) = 0 for k > A036234(n). The triangle contains all positive values of T.

Examples

			T(5,3) = 7 because there are 7 3-element subsets of {1,2,3,4,5} having pairwise coprime elements: {1,2,3}, {1,2,5}, {1,3,4}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}.
Irregular Triangle T(n,k) begins:
  1;
  2,  1;
  3,  3,  1;
  4,  5,  2;
  5,  9,  7,  2;
  6, 11,  8,  2;
  7, 17, 19, 10, 2;
		

Crossrefs

Row sums give A187106.
Rightmost terms of rows give A319187.

Programs

  • Maple
    with(numtheory):
    s:= proc(m, r) option remember; mul(`if`(i pi(n) +1:
    b:= proc(t, n, k) option remember; local c, d, h;
          if k=0 or k>n then 0
        elif k=1 then 1
        elif k=2 and t=n then `if`(n<2, 0, phi(n))
        else c:= 0;
             d:= 2-irem(t, 2);
             for h from 1 to n-1 by d do
               if igcd(t, h)=1 then c:= c +b(s(t*h, h), h, k-1) fi
             od; c
          fi
        end:
    T:= proc(n, k) option remember;
           b(s(n, n), n, k) +`if`(n<2, 0, T(n-1, k))
        end:
    seq(seq(T(n, k), k=1..a(n)), n=1..20);
  • Mathematica
    s[m_, r_] := s[m, r] = Product[If[i < r, i, 1], {i, FactorInteger[m][[All, 1]]}]; a[n_] := PrimePi[n]+1; b[t_, n_, k_] := b[t, n, k] = Module[{c, d, h}, Which[k == 0 || k > n, 0, k == 1, 1, k == 2 && t == n, If[n < 2, 0, EulerPhi[n]], True, c = 0; d = 2-Mod[t, 2]; For[h = 1, h <= n-1, h = h+d, If[ GCD[t, h] == 1, c = c + b[s[t*h, h], h, k-1]]]; c]]; t[n_, k_] := t[n, k] = b[s[n, n], n, k] + If[n < 2, 0, t[n-1, k]]; Table[Table[t[n, k], { k, 1, a[n]}], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

Formula

T(n,k) = Sum_{i=1..n} A186972(i,k).

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

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

A187262 Irregular triangle T(n,k), n>=1, 1<=k<=A036234(n), read by rows: T(n,k) is the number of nonempty subsets of {1, 2, ..., n} having <=k pairwise coprime elements.

Original entry on oeis.org

1, 2, 3, 3, 6, 7, 4, 9, 11, 5, 14, 21, 23, 6, 17, 25, 27, 7, 24, 43, 53, 55, 8, 29, 54, 68, 71, 9, 36, 73, 97, 103, 10, 41, 83, 109, 115, 11, 52, 125, 193, 225, 231, 12, 57, 136, 208, 241, 247, 13, 70, 194, 345, 450, 489, 495, 14, 77, 215, 382, 496, 537, 543
Offset: 1

Views

Author

Alois P. Heinz, Mar 07 2011

Keywords

Comments

T(n,k) = T(n,k-1) for k>A036234(n). The triangle contains all values of T up to the last element of each row that is different from its predecessor.

Examples

			T(5,3) = 21 because there are 21 nonempty subsets of {1,2,3,4,5} having <=3 pairwise coprime elements: {1}, {2}, {3}, {4}, {5}, {1,2}, {1,3}, {1,4}, {1,5}, {2,3}, {2,5}, {3,4}, {3,5}, {4,5}, {1,2,3}, {1,2,5}, {1,3,4}, {1,3,5}, {1,4,5}, {2,3,5}, {3,4,5}.
Irregular Triangle T(n,k) begins:
  1;
  2,  3;
  3,  6,  7;
  4,  9, 11;
  5, 14, 21, 23;
  6, 17, 25, 27;
  7, 24, 43, 53, 55;
		

Crossrefs

Rightmost elements of rows give A187106.

Formula

T(n,k) = Sum_{i=1..n,j=1..k} A186972(i,j).
T(n,k) = Sum_{j=1..k} A186974(n,j).
T(n,k) = Sum_{i=1..n} A186975(i,k).

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

A320423 Number of set partitions of {1,...,n} where each block's elements are pairwise coprime.

Original entry on oeis.org

1, 1, 1, 2, 2, 8, 4, 28, 18, 120, 60, 888, 252, 5220, 1860, 22224, 9552, 311088, 59616, 2473056, 565920, 13627008, 4051872, 235039392, 33805440, 1932037632, 465239808, 20604487680, 4294865664, 386228795904, 35413136640
Offset: 0

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. A single number is not considered to be pairwise coprime unless it is equal to 1.

Examples

			The a(5) = 8 set partitions:
  {{1},{2,3},{4,5}}
  {{1},{2,5},{3,4}}
   {{1,2},{3,4,5}}
   {{1,4},{2,3,5}}
   {{1,2,3},{4,5}}
   {{1,2,5},{3,4}}
   {{1,3,4},{2,5}}
   {{1,4,5},{2,3}}
		

Crossrefs

Programs

  • Mathematica
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[Select[Subsets[Range[n]],CoprimeQ@@#&],Range[n]]],{n,10}]

Extensions

a(17)-a(18) from Alois P. Heinz, Jan 17 2019
a(19)-a(30) from Christian Sievers, Nov 28 2024

A343655 Number of pairwise coprime sets of divisors of n, where a singleton is not considered pairwise coprime unless it is {1}.

Original entry on oeis.org

1, 2, 2, 3, 2, 6, 2, 4, 3, 6, 2, 10, 2, 6, 6, 5, 2, 10, 2, 10, 6, 6, 2, 14, 3, 6, 4, 10, 2, 22, 2, 6, 6, 6, 6, 17, 2, 6, 6, 14, 2, 22, 2, 10, 10, 6, 2, 18, 3, 10, 6, 10, 2, 14, 6, 14, 6, 6, 2, 38, 2, 6, 10, 7, 6, 22, 2, 10, 6, 22, 2, 24, 2, 6, 10, 10, 6, 22, 2
Offset: 1

Views

Author

Gus Wiseman, Apr 26 2021

Keywords

Comments

First differs from A015995 at a(210) = 88, A015995(210) = 86.

Examples

			For example, the a(n) subsets for n = 1, 2, 4, 6, 8, 12, 16, 24 are:
  {1}  {1}    {1}    {1}      {1}    {1}      {1}     {1}
       {1,2}  {1,2}  {1,2}    {1,2}  {1,2}    {1,2}   {1,2}
              {1,4}  {1,3}    {1,4}  {1,3}    {1,4}   {1,3}
                     {1,6}    {1,8}  {1,4}    {1,8}   {1,4}
                     {2,3}           {1,6}    {1,16}  {1,6}
                     {1,2,3}         {2,3}            {1,8}
                                     {3,4}            {2,3}
                                     {1,12}           {3,4}
                                     {1,2,3}          {3,8}
                                     {1,3,4}          {1,12}
                                                      {1,24}
                                                      {1,2,3}
                                                      {1,3,4}
                                                      {1,3,8}
		

Crossrefs

The case of pairs is A063647.
The case of triples is A066620.
The version with empty sets and singletons is A225520.
A version for prime indices is A304711.
The version for strict integer partitions is A305713.
The version for subsets of {1..n} is A320426 = A276187 + 1.
The version for binary indices is A326675.
The version for integer partitions is A327516.
The version for standard compositions is A333227.
The maximal case is A343652.
The case without 1's is A343653.
The case without 1's with singletons is A343654.
The maximal case without 1's is A343660.
A018892 counts coprime unordered pairs of divisors.
A051026 counts pairwise indivisible subsets of {1..n}.
A100565 counts pairwise coprime unordered triples of divisors.
A325683 counts maximal Golomb rulers.
A326077 counts maximal pairwise indivisible sets.

Programs

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

A343654 Number of pairwise coprime sets of divisors > 1 of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 4, 3, 5, 2, 8, 2, 5, 5, 5, 2, 8, 2, 8, 5, 5, 2, 11, 3, 5, 4, 8, 2, 15, 2, 6, 5, 5, 5, 13, 2, 5, 5, 11, 2, 15, 2, 8, 8, 5, 2, 14, 3, 8, 5, 8, 2, 11, 5, 11, 5, 5, 2, 25, 2, 5, 8, 7, 5, 15, 2, 8, 5, 15, 2, 18, 2, 5, 8, 8, 5, 15, 2, 14, 5, 5
Offset: 1

Views

Author

Gus Wiseman, Apr 26 2021

Keywords

Comments

First differs from A100565 at a(210) = 52, A100565(210) = 51.

Examples

			The a(n) sets for n = 1, 2, 4, 6, 8, 12, 24, 30, 32, 36, 48:
  {}  {}   {}   {}     {}   {}     {}     {}       {}    {}     {}
      {2}  {2}  {2}    {2}  {2}    {2}    {2}      {2}   {2}    {2}
           {4}  {3}    {4}  {3}    {3}    {3}      {4}   {3}    {3}
                {6}    {8}  {4}    {4}    {5}      {8}   {4}    {4}
                {2,3}       {6}    {6}    {6}      {16}  {6}    {6}
                            {12}   {8}    {10}     {32}  {9}    {8}
                            {2,3}  {12}   {15}           {12}   {12}
                            {3,4}  {24}   {30}           {18}   {16}
                                   {2,3}  {2,3}          {36}   {24}
                                   {3,4}  {2,5}          {2,3}  {48}
                                   {3,8}  {3,5}          {2,9}  {2,3}
                                          {5,6}          {3,4}  {3,4}
                                          {2,15}         {4,9}  {3,8}
                                          {3,10}                {3,16}
                                          {2,3,5}
		

Crossrefs

The version for partitions is A007359.
The version for subsets of {1..n} is A084422.
The case of pairs is A089233.
The version with 1's is A225520.
The maximal case is A343652.
The case without empty sets or singletons is A343653.
The maximal case without singletons is A343660.
A018892 counts pairwise coprime unordered pairs of divisors.
A051026 counts pairwise indivisible subsets of {1..n}.
A100565 counts pairwise coprime unordered triples of divisors.
A187106, A276187, and A320426 count other types of pairwise coprime sets.
A326077 counts maximal pairwise indivisible sets.

Programs

  • Mathematica
    pwcop[y_]:=And@@(GCD@@#1==1&)/@Subsets[y,{2}];
    Table[Length[Select[Subsets[Rest[Divisors[n]]],pwcop]],{n,100}]

A343659 Number of maximal pairwise coprime subsets of {1..n}.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 7, 9, 9, 10, 10, 12, 16, 19, 19, 20, 20, 22, 28, 32, 32, 33, 54, 61, 77, 84, 84, 85, 85, 94, 112, 123, 158, 161, 161, 176, 206, 212, 212, 214, 214, 229, 241, 260, 260, 263, 417, 428, 490, 521, 521, 526, 655, 674, 764, 818, 818, 820, 820, 874, 918, 975, 1182, 1189, 1189
Offset: 1

Views

Author

Gus Wiseman, Apr 26 2021

Keywords

Comments

For this sequence, it does not matter whether singletons are considered pairwise coprime.
For n > 2, also the number of maximal pairwise coprime subsets of {2..n}.
For each prime p <= n, p divides exactly one element of each maximal subset. - Bert Dobbelaere, May 04 2021

Examples

			The a(1) = 1 through a(9) = 7 subsets:
  {1}  {12}  {123}  {123}  {1235}  {156}   {1567}   {1567}   {1567}
                    {134}  {1345}  {1235}  {12357}  {12357}  {12357}
                                   {1345}  {13457}  {13457}  {12579}
                                                    {13578}  {13457}
                                                             {13578}
                                                             {14579}
                                                             {15789}
		

Crossrefs

The case of pairs is A015614.
The case of triples is A015617.
The non-maximal version counting empty sets and singletons is A084422.
The non-maximal version counting singletons is A187106.
The non-maximal version is A320426(n) = A276187(n) + 1.
The version for indivisibility instead of coprimality is A326077.
The version for sets of divisors is A343652.
The version for sets of divisors > 1 is A343660.
A018892 counts coprime unordered pairs of divisors.
A051026 counts pairwise indivisible subsets of {1..n}.
A100565 counts pairwise coprime unordered triples of divisors.

Programs

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

Extensions

More terms from Bert Dobbelaere, May 04 2021
Showing 1-10 of 14 results. Next