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

A097699 Records in the numbers of antichains in the divisor lattice D(n) (A096827).

Original entry on oeis.org

2, 3, 4, 6, 10, 15, 20, 21, 50, 105, 175, 196, 490, 887, 1176, 3490
Offset: 1

Views

Author

John W. Layman, Aug 20 2004

Keywords

Comments

The divisor lattice D(n) is the lattice of the divisors of the natural number n. This sequence counts the empty set as an antichain.

Crossrefs

Cf. A096827.

A051026 Number of primitive subsequences of {1, 2, ..., n}.

Original entry on oeis.org

1, 2, 3, 5, 7, 13, 17, 33, 45, 73, 103, 205, 253, 505, 733, 1133, 1529, 3057, 3897, 7793, 10241, 16513, 24593, 49185, 59265, 109297, 163369, 262489, 355729, 711457, 879937, 1759873, 2360641, 3908545, 5858113, 10534337, 12701537, 25403073, 38090337, 63299265, 81044097, 162088193, 205482593, 410965185, 570487233, 855676353
Offset: 0

Views

Author

Keywords

Comments

a(n) counts all subsequences of {1, ..., n} in which no term divides any other. If n is a prime a(n) = 2*a(n-1)-1 because for each subsequence s counted by a(n-1) two different subsequences are counted by a(n): s and s,n. There is only one exception: 1,n is not a primitive subsequence because 1 divides n. For all n>1: a(n) < 2*a(n-1). - Alois P. Heinz, Mar 07 2011
Maximal primitive subsets are counted by A326077. - Gus Wiseman, Jun 07 2019

Examples

			a(4) = 7, the primitive subsequences (including the empty sequence) are: (), (1), (2), (3), (4), (2,3), (3,4).
a(5) = 13 = 2*7-1, the primitive subsequences are: (), (5), (1), (2), (2,5), (3), (3,5), (4), (4,5), (2,3), (2,3,5), (3,4), (3,4,5).
From _Gus Wiseman_, Jun 07 2019: (Start)
The a(0) = 1 through a(5) = 13 primitive (pairwise indivisible) 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,5}
                              {3,4}
                              {3,5}
                              {4,5}
                              {2,3,5}
                              {3,4,5}
a(n) is also the number of subsets of {1..n} containing all of their pairwise products <= n as well as any quotients of divisible elements. For example, the a(0) = 1 through a(5) = 13 subsets are:
  {}  {}   {}     {}       {}         {}
      {1}  {1}    {1}      {1}        {1}
           {1,2}  {1,2}    {1,3}      {1,3}
                  {1,3}    {1,4}      {1,4}
                  {1,2,3}  {1,2,4}    {1,5}
                           {1,3,4}    {1,2,4}
                           {1,2,3,4}  {1,3,4}
                                      {1,3,5}
                                      {1,4,5}
                                      {1,2,3,4}
                                      {1,2,4,5}
                                      {1,3,4,5}
                                      {1,2,3,4,5}
Also the number of subsets of {1..n} containing all of their multiples <= n. For example, the a(0) = 1 through a(5) = 13 subsets are:
  {}  {}   {}     {}       {}         {}
      {1}  {2}    {2}      {3}        {3}
           {1,2}  {3}      {4}        {4}
                  {2,3}    {2,4}      {5}
                  {1,2,3}  {3,4}      {2,4}
                           {2,3,4}    {3,4}
                           {1,2,3,4}  {3,5}
                                      {4,5}
                                      {2,3,4}
                                      {2,4,5}
                                      {3,4,5}
                                      {2,3,4,5}
                                      {1,2,3,4,5}
(End)
From _Gus Wiseman_, Mar 12 2024: (Start)
Also the number of subsets of {1..n} containing all divisors of the elements. For example, the a(0) = 1 through a(6) = 17 subsets are:
  {}  {}   {}     {}       {}         {}
      {1}  {1}    {1}      {1}        {1}
           {1,2}  {1,2}    {1,2}      {1,2}
                  {1,3}    {1,3}      {1,3}
                  {1,2,3}  {1,2,3}    {1,5}
                           {1,2,4}    {1,2,3}
                           {1,2,3,4}  {1,2,4}
                                      {1,2,5}
                                      {1,3,5}
                                      {1,2,3,4}
                                      {1,2,3,5}
                                      {1,2,4,5}
                                      {1,2,3,4,5}
(End)
		

References

  • Blanchet-Sadri, Francine. Algorithmic combinatorics on partial words. Chapman & Hall/CRC, Boca Raton, FL, 2008. ii+385 pp. ISBN: 978-1-4200-6092-8; 1-4200-6092-9 MR2384993 (2009f:68142). See p. 320. - N. J. A. Sloane, Apr 06 2012

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(s) option remember; local n;
          n:= max(s[]);
          `if`(n<0, 1, b(s minus {n}) + b(s minus divisors(n)))
        end:
    bb:= n-> b({$2..n} minus divisors(n)):
    sb:= proc(n) option remember; `if`(n<2, 0, bb(n) + sb(n-1)) end:
    a:= n-> `if`(n=0, 1, `if`(isprime(n), 2*a(n-1)-1, 2+sb(n))):
    seq(a(n), n=0..40);  # Alois P. Heinz, Mar 07 2011
  • Mathematica
    b[s_] := b[s] = With[{n=Max[s]}, If[n < 0, 1, b[Complement[s, {n}]] + b[Complement[s, Divisors[n]]]]];
    bb[n_] := b[Complement[Range[2, n], Divisors[n]]];
    sb[n_] := sb[n] = If[n < 2, 0, bb[n] + sb[n-1]];
    a[n_] := If[n == 0, 1, If[PrimeQ[n], 2a[n-1] - 1, 2 + sb[n]]]; Table[a[n], {n, 0, 37}]
    (* Jean-François Alcover, Jul 27 2011, converted from Maple *)
    Table[Length[Select[Subsets[Range[n]], SubsetQ[#,Select[Union@@Table[#*i,{i,n}],#<=n&]]&]],{n,10}] (* Gus Wiseman, Jun 07 2019 *)
    Table[Length[Select[Subsets[Range[n]], #==Union@@Divisors/@#&]],{n,0,10}] (* Gus Wiseman, Mar 12 2024 *)

Extensions

More terms from David Wasserman, May 02 2002
a(32)-a(37) from Donovan Johnson, Aug 11 2010

A319721 Number of non-isomorphic antichains of multisets of weight n.

Original entry on oeis.org

1, 1, 4, 8, 24, 50, 148, 349, 1014, 2717, 8114
Offset: 0

Views

Author

Gus Wiseman, Sep 26 2018

Keywords

Comments

In an antichain, no part is a proper submultiset of any other. The weight of an antichain is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Non-isomorphic representatives of the a(1) = 1 through a(3) = 8 antichains:
1: {{1}}
2: {{1,1}}
   {{1,2}}
   {{1},{1}}
   {{1},{2}}
3: {{1,1,1}}
   {{1,2,2}}
   {{1,2,3}}
   {{1},{2,2}}
   {{1},{2,3}}
   {{1},{1},{1}}
   {{1},{2},{2}}
   {{1},{2},{3}}
		

Crossrefs

A319719 Number of non-isomorphic connected antichains of multisets of weight n.

Original entry on oeis.org

1, 1, 3, 4, 10, 14, 48, 95, 305, 822, 2615
Offset: 0

Views

Author

Gus Wiseman, Sep 26 2018

Keywords

Comments

In an antichain, no part is a proper submultiset of any other. The weight of an antichain is the sum of sizes of its parts. Weight is generally not the same as number of vertices. Connected antichains are also called clutters.

Examples

			Non-isomorphic representatives of the a(1) = 1 through a(4) = 10 connected antichains:
1: {{1}}
2: {{1,1}}
   {{1,2}}
   {{1},{1}}
3: {{1,1,1}}
   {{1,2,2}}
   {{1,2,3}}
   {{1},{1},{1}}
4: {{1,1,1,1}}
   {{1,1,2,2}}
   {{1,2,2,2}}
   {{1,2,3,3}}
   {{1,2,3,4}}
   {{1,1},{1,1}}
   {{1,2},{1,2}}
   {{1,2},{2,2}}
   {{1,3},{2,3}}
   {{1},{1},{1},{1}}
		

Crossrefs

A096825 Maximal size of an antichain in divisor lattice D(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 4, 2, 2, 2, 2, 1, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com) and Vladeta Jovovic, Aug 17 2004

Keywords

Comments

The divisor lattice D(n) is the lattice of the divisors of the natural number n.
Also the number of divisors of n with half (rounded either way) as many prime factors (counting multiplicity) as n. - Gus Wiseman, Aug 24 2018

Examples

			There are two maximal size antichains of divisors of 180, namely {12, 18, 20, 30, 45} and {4, 6, 9, 10, 15}. Both have length 5 so a(180) = 5. - _Gus Wiseman_, Aug 24 2018
		

Crossrefs

Programs

  • Maple
    a:=proc(n) local klist,x; klist:=ifactors(n)[2,1..-1,2]; coeff(normal(mul((1-x^(k+1))/(1-x),k=klist)),x,floor(add(k,k=klist)/2)) end: seq(a(n), n=1..100);
  • Mathematica
    a[n_] := Module[{pp, kk, x}, {pp, kk} = Transpose[FactorInteger[n]]; Coefficient[ Product[ Total[x^Range[0, k]], {k, kk}], x, Quotient[ Total[ kk], 2] ] ]; Array[a, 100] (* Jean-François Alcover, Nov 20 2017 *)
    Table[Length[Select[Divisors[n],PrimeOmega[#]==Round[PrimeOmega[n]/2]&]],{n,50}] (* Gus Wiseman, Aug 24 2018 *)
  • PARI
    a(n)=if(n<6||isprimepower(n), return(1)); my(d=divisors(n),r=1,u); d=d[2..#d-1];for(k=0,2^#d-1,if(hammingweight(k)<=r,next); u=vecextract(d,k); for(i=1,#u, for(j=i+1,#u, if(u[j]%u[i]==0, next(3))));r=#u);r \\ Charles R Greathouse IV, May 14 2013
    
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A096825(n):
        fs = factorint(n)
        return len(list(multiset_combinations(fs,sum(fs.values())//2))) # Chai Wah Wu, Aug 23 2021
  • Sage
    def A096825(n) :
        if n==1 : return 1
        R. = QQ[]; mults = [x[1] for x in factor(n)]
        return prod((t^(m+1)-1)//(t-1) for m in mults)[sum(mults)//2]
    # Eric M. Schmidt, May 11 2013
    

Formula

a(n) is the coefficient at x^k in (1+x+...+x^k_1)*...*(1+x+...+x^k_q) where n=p_1^k_1*...*p_q^k_q is the prime factorization of n and k=floor((k_1+...+k_q)/2). - Alec Mihailovs (alec(AT)mihailovs.com), Aug 22 2004

Extensions

More terms from Alec Mihailovs (alec(AT)mihailovs.com), Aug 22 2004

A326077 Number of maximal primitive subsets of {1..n}.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 6, 7, 11, 11, 13, 13, 23, 24, 36, 36, 48, 48, 64, 66, 126, 126, 150, 151, 295, 363, 507, 507, 595, 595, 895, 903, 1787, 1788, 2076, 2076, 4132, 4148, 5396, 5396, 6644, 6644, 9740, 11172, 22300, 22300, 26140, 26141, 40733, 40773, 60333, 60333, 80781, 80783
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

a(n) is the number of maximal primitive subsets of {1, ..., n}. Here primitive means that no element of the subset divides any other and maximal means that no element can be added to the subset while maintaining the property of being pairwise indivisible. - Nathan McNew, Aug 10 2020

Examples

			The a(0) = 1 through a(9) = 7 sets:
  {}  {1}  {1}  {1}   {1}   {1}    {1}    {1}     {1}     {1}
           {2}  {23}  {23}  {235}  {235}  {2357}  {2357}  {2357}
                      {34}  {345}  {345}  {3457}  {3457}  {2579}
                                   {456}  {4567}  {3578}  {3457}
                                                  {4567}  {3578}
                                                  {5678}  {45679}
                                                          {56789}
		

Crossrefs

Programs

  • Mathematica
    stableQ[u_, Q_]:=!Apply[Or, Outer[#1=!=#2&&Q[#1, #2]&, u, u, 1], {0, 1}];
    fasmax[y_]:=Complement[y, Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],stableQ[#,Divisible]&]]],{n,0,10}]
  • PARI
    divset(n)={sumdiv(n, d, if(dif(k>#p, ismax(b), my(f=!bitand(p[k], b)); if(!f || bittest(d, k), self()(k+1, b)) + if(f, self()(k+1, b+(1<Andrew Howroyd, Aug 30 2019

Extensions

Terms a(19) to a(55) from Andrew Howroyd, Aug 30 2019
Name edited by Nathan McNew, Aug 10 2020

A321679 Number of non-isomorphic weight-n antichains (not necessarily strict) of sets.

Original entry on oeis.org

1, 1, 3, 5, 12, 19, 45, 75, 170, 314, 713
Offset: 0

Views

Author

Gus Wiseman, Nov 16 2018

Keywords

Comments

The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Non-isomorphic representatives of the a(1) = 1 through a(5) = 19 antichains:
  {{1}}  {{1,2}}    {{1,2,3}}      {{1,2,3,4}}        {{1,2,3,4,5}}
         {{1},{1}}  {{1},{2,3}}    {{1,2},{1,2}}      {{1},{2,3,4,5}}
         {{1},{2}}  {{1},{1},{1}}  {{1},{2,3,4}}      {{1,2},{3,4,5}}
                    {{1},{2},{2}}  {{1,2},{3,4}}      {{1,4},{2,3,4}}
                    {{1},{2},{3}}  {{1,3},{2,3}}      {{1},{1},{2,3,4}}
                                   {{1},{1},{2,3}}    {{1},{2,3},{2,3}}
                                   {{1},{2},{3,4}}    {{1},{2},{3,4,5}}
                                   {{1},{1},{1},{1}}  {{1},{2,3},{4,5}}
                                   {{1},{1},{2},{2}}  {{1},{2,4},{3,4}}
                                   {{1},{2},{2},{2}}  {{1},{1},{1},{2,3}}
                                   {{1},{2},{3},{3}}  {{1},{2},{2},{3,4}}
                                   {{1},{2},{3},{4}}  {{1},{2},{3},{4,5}}
                                                      {{1},{1},{1},{1},{1}}
                                                      {{1},{1},{2},{2},{2}}
                                                      {{1},{2},{2},{2},{2}}
                                                      {{1},{2},{2},{3},{3}}
                                                      {{1},{2},{3},{3},{3}}
                                                      {{1},{2},{3},{4},{4}}
                                                      {{1},{2},{3},{4},{5}}
		

Crossrefs

A175177 Conjectured number of numbers for which the iteration x -> phi(x) + 1 terminates at prime(n). Cardinality of rooted tree T_p (where p is n-th prime) in Karpenko's book.

Original entry on oeis.org

2, 3, 4, 9, 2, 31, 6, 4, 2, 2, 2, 11, 24, 41, 2, 2, 2, 57, 2, 2, 58, 2, 2, 6, 17, 4, 2, 2, 39, 67, 2, 2, 2, 2, 2, 2, 25, 4, 2, 2, 2, 158, 2, 61, 2, 2, 2, 2, 2, 2, 54, 2, 186, 2, 10, 2, 2, 2, 18, 8, 2, 2, 2, 2, 96, 2, 2, 18, 2, 6, 15, 2, 2, 2, 2, 2, 2, 44, 34, 6, 2, 16, 2, 105, 2, 2, 60, 5, 4, 2, 2, 2, 4
Offset: 1

Views

Author

Artur Jasinski, Mar 01 2010

Keywords

Examples

			a(3) = 4 because x = { 5, 8, 10, 12 } are the 4 numbers from which the iteration x -> phi(x) + 1 terminates at prime(3) = 5.
a(4) = 8 because x = { 7, 9, 14, 15, 16, 18, 20, 24, 30 } are the 9 numbers from which the iteration x -> phi(x) + 1 terminates at prime(4) = 7.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, Third Edition, Springer, New York 2004. Chapter B41, Iterations of phi and sigma, page 148.
  • A. S. Karpenko, Lukasiewicz's Logics and Prime Numbers, (English translation), 2006. See Table 2 on p.125 ff.
  • A. S. Karpenko, Lukasiewicz's Logics and Prime Numbers, (Russian), 2000.

Crossrefs

Programs

  • PARI
    iterat(x) = {my(k,s); if ( isprime(x),return(x)); s=x;
    for (k=1,1000000000,s=eulerphi(s)+1;if(isprime(s),return(s)));
    return(s); }
    check(y,endrange) = {my(count,start); count=0;
    for(start=1,endrange,if(iterat(start)==y,count++;));
    return(count); }
    for (n=1,93,x=prime(n);print1(check(x,1000000),", "))
    \\ Hugo Pfoertner, Sep 23 2017

Extensions

Name clarified by Hugo Pfoertner, Sep 23 2017

A175178 a(n)=Values of cardinality of rooted trees CRT for successive primes.

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 1, 1, 1, 1, 1, 2, 4, 6, 1, 1, 2, 9, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 16, 1, 9, 2, 1, 1, 1, 1, 1, 7, 1, 19, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 6, 3, 1, 1, 2, 1, 11, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1
Offset: 1

Views

Author

Artur Jasinski, Mar 01 2010

Keywords

References

  • Karpenko A.S. 2006. Lukasiewicz's Logics and Prime Numbers (English translation).
  • Karpenko A.S. 2000. Lukasiewicz's Logics and Prime Numbers (Russian).

Crossrefs

A318394 Number of finite sets of set partitions of {1,...,n} such that any two have meet {{1},...,{n}}.

Original entry on oeis.org

2, 4, 18, 316, 37492
Offset: 1

Views

Author

Gus Wiseman, Aug 25 2018

Keywords

Examples

			The a(3) = 18 sets of set partitions:
        0
    {{1,2,3}}
   {{1,3},{2}}
   {{1,2},{3}}
   {{1},{2,3}}
  {{1},{2},{3}}
   {{1,2},{3}}   {{1,3},{2}}
   {{1},{2,3}}   {{1,3},{2}}
   {{1},{2,3}}   {{1,2},{3}}
  {{1},{2},{3}}   {{1,2,3}}
  {{1},{2},{3}}  {{1,3},{2}}
  {{1},{2},{3}}  {{1,2},{3}}
  {{1},{2},{3}}  {{1},{2,3}}
   {{1},{2,3}}   {{1,2},{3}}  {{1,3},{2}}
  {{1},{2},{3}}  {{1,2},{3}}  {{1,3},{2}}
  {{1},{2},{3}}  {{1},{2,3}}  {{1,3},{2}}
  {{1},{2},{3}}  {{1},{2,3}}  {{1,2},{3}}
  {{1},{2},{3}}  {{1},{2,3}}  {{1,2},{3}}  {{1,3},{2}}
		

Crossrefs

Programs

  • Mathematica
    stableSets[u_,Q_]:=If[Length[u]===0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r===w||Q[r,w]||Q[w,r]],Q]]]];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    spmeet[a_,b_]:=DeleteCases[Union@@Outer[Intersection,a,b,1],{}];spmeet[a_,b_,c__]:=spmeet[spmeet[a,b],c];
    Table[Length[stableSets[sps[Range[n]],Max@@Length/@spmeet[#1,#2]>1&]],{n,5}]
Showing 1-10 of 22 results. Next