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

A316476 Stable numbers. Numbers whose distinct prime indices are pairwise indivisible.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 23, 25, 27, 29, 31, 32, 33, 35, 37, 41, 43, 45, 47, 49, 51, 53, 55, 59, 61, 64, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 89, 91, 93, 95, 97, 99, 101, 103, 107, 109, 113, 119, 121, 123, 125, 127, 128, 131, 135, 137
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n.

Examples

			The prime indices of 45 are {2,2,3}, so the distinct prime indices are {2,3}, which are pairwise indivisible, so 45 belongs to the sequence.
The prime indices of 105 are {2,3,4}, which are not pairwise indivisible (2 divides 4), so 105 does not belong to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],Select[Tuples[If[#===1,{},Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]]],2],UnsameQ@@#&&Divisible@@#&]=={}&]
  • PARI
    ok(n)={my(v=apply(primepi, factor(n)[,1])); for(j=2, #v, for(i=1, j-1, if(v[j]%v[i]==0, return(0)))); 1} \\ Andrew Howroyd, Aug 26 2018

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

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

A305148 Number of integer partitions of n whose distinct parts are pairwise indivisible.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 12, 12, 17, 20, 22, 28, 35, 39, 48, 55, 65, 79, 90, 105, 121, 143, 166, 190, 219, 254, 290, 332, 382, 436, 493, 567, 637, 729, 824, 931, 1052, 1186, 1334, 1504, 1691, 1894, 2123, 2380, 2664, 2968, 3319, 3704, 4119, 4586, 5110
Offset: 0

Views

Author

Gus Wiseman, May 26 2018

Keywords

Examples

			The a(9) = 7 integer partitions are (9), (72), (54), (522), (333), (3222), (111111111).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Select[Tuples[Union[#],2],UnsameQ@@#&&Divisible@@#&]=={}&]],{n,20}]

Extensions

More terms from Alois P. Heinz, May 26 2018

A304713 Squarefree numbers whose prime indices are pairwise indivisible. Heinz numbers of strict integer partitions with pairwise indivisible parts.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31, 33, 35, 37, 41, 43, 47, 51, 53, 55, 59, 61, 67, 69, 71, 73, 77, 79, 83, 85, 89, 91, 93, 95, 97, 101, 103, 107, 109, 113, 119, 123, 127, 131, 137, 139, 141, 143, 145, 149, 151, 155, 157, 161, 163, 165, 167, 173
Offset: 1

Views

Author

Gus Wiseman, May 17 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of entries together with their corresponding multiset multisystems (see A302242) begins:
1:  {}
2:  {{}}
3:  {{1}}
5:  {{2}}
7:  {{1,1}}
11: {{3}}
13: {{1,2}}
15: {{1},{2}}
17: {{4}}
19: {{1,1,1}}
23: {{2,2}}
29: {{1,3}}
31: {{5}}
33: {{1},{3}}
35: {{2},{1,1}}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300],SquareFreeQ[#]&&Select[Tuples[PrimePi/@First/@FactorInteger[#],2],UnsameQ@@#&&Divisible@@#&]==={}&]

A316475 Number of locally stable rooted trees with n nodes, meaning no branch is a submultiset of any other (unequal) branch of the same root.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 14, 25, 50, 101, 207, 426, 902, 1917, 4108, 8887, 19335, 42330, 93130, 205894, 456960, 1018098, 2275613, 5102248, 11471107, 25856413
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Examples

			The a(6) = 7 locally stable rooted trees:
(((((o)))))
((((oo))))
(((ooo)))
(((o)(o)))
((oooo))
((o)((o)))
(ooooo)
		

Crossrefs

Programs

  • Mathematica
    submultisetQ[M_,N_]:=Or[Length[M]==0,MatchQ[{Sort[List@@M],Sort[List@@N]},{{x_,Z___},{_,x_,W___}}/;submultisetQ[{Z},{W}]]]
    strut[n_]:=strut[n]=If[n===1,{{}},Select[Join@@Function[c,Union[Sort/@Tuples[strut/@c]]]/@IntegerPartitions[n-1],Select[Tuples[#,2],UnsameQ@@#&&submultisetQ@@#&]=={}&]];
    Table[Length[strut[n]],{n,15}]

Extensions

a(21)-a(26) from Robert Price, Sep 13 2018

A316495 Matula-Goebel numbers of locally disjoint unlabeled rooted trees, meaning no branch overlaps any other (unequal) branch of the same root.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 47, 48, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 79, 80, 82, 85
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. A number is in the sequence iff either it is equal to 1, it is a prime number whose prime index already belongs to the sequence, or its distinct prime indices are pairwise coprime and already belong to the sequence.

Examples

			The sequence of all locally disjoint rooted trees preceded by their Matula-Goebel numbers begins:
   1: o
   2: (o)
   3: ((o))
   4: (oo)
   5: (((o)))
   6: (o(o))
   7: ((oo))
   8: (ooo)
  10: (o((o)))
  11: ((((o))))
  12: (oo(o))
  13: ((o(o)))
  14: (o(oo))
  15: ((o)((o)))
  16: (oooo)
  17: (((oo)))
  18: (o(o)(o))
  19: ((ooo))
  20: (oo((o)))
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    go[n_]:=Or[n==1,And[Or[PrimeQ[n],CoprimeQ@@Union[primeMS[n]]],And@@go/@primeMS[n]]];
    Select[Range[100],go]

A120641 Number of partitions of n into distinct double-free parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 5, 5, 7, 8, 10, 12, 14, 17, 20, 24, 26, 31, 38, 45, 50, 57, 68, 77, 88, 101, 116, 132, 151, 170, 194, 222, 247, 281, 318, 356, 399, 452, 509, 567, 635, 709, 794, 885, 983, 1094, 1222, 1358, 1504, 1671, 1854, 2050, 2264, 2505, 2771, 3060, 3370
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 17 2006

Keywords

Examples

			a(10) = #{10, 9+1, 8+2, 7+3, 6+4, 5+4+1, 5+3+2} = 7;
a(11) = #{11, 10+1, 9+2, 8+3, 7+4, 7+3+1, 6+5, 6+4+1} = 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Intersection[#,2*#]=={}&]],{n,30}] (* Gus Wiseman, Jan 07 2019 *)

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 16 2019

A316471 Number of locally disjoint rooted identity trees with n nodes, meaning no branch overlaps any other branch of the same root.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 11, 21, 43, 89, 185, 391, 840, 1822, 3975, 8727, 19280, 42841, 95661, 214490
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2018

Keywords

Examples

			The a(7) = 11 locally disjoint rooted identity trees:
((((((o))))))
((((o(o)))))
(((o((o)))))
((o(((o)))))
((o(o(o))))
(((o)((o))))
(o((((o)))))
(o((o(o))))
(o(o((o))))
((o)(((o))))
(o(o)((o)))
		

Crossrefs

Programs

  • Mathematica
    strut[n_]:=strut[n]=If[n===1,{{}},Select[Join@@Function[c,Union[Sort/@Tuples[strut/@c]]]/@IntegerPartitions[n-1],UnsameQ@@#&&Select[Tuples[#,2],UnsameQ@@#&&(Intersection@@#=!={})&]=={}&]];
    Table[Length[strut[n]],{n,20}]

A371128 Number of strict integer partitions of n containing all distinct divisors of all parts.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 2, 1, 2, 2, 3, 3, 3, 5, 3, 5, 6, 7, 7, 8, 8, 9, 12, 13, 13, 14, 15, 16, 19, 23, 25, 26, 26, 27, 36, 37, 40, 42, 46, 50, 55, 66, 65, 71, 71, 82, 90, 102, 103, 114, 117, 130, 147, 154, 166, 176, 182, 194, 228, 239, 259, 267, 287, 307, 336
Offset: 0

Views

Author

Gus Wiseman, Mar 18 2024

Keywords

Comments

Also strict integer partitions such that the number of parts is equal to the number of distinct divisors of all parts.

Examples

			The a(9) = 1 through a(19) = 7 partitions (A..H = 10..17):
  531  721   731   B1    751   D1    B31    D21    B51    H1     B71
       4321  5321  5421  931   B21   7521   7531   D31    9531   D51
                   6321  7321  7421  8421   64321  B321   A521   B521
                                     9321          65321  B421   D321
                                     54321         74321  75321  75421
                                                          84321  76321
                                                                 94321
		

Crossrefs

The LHS is represented by A001221, distinct case of A001222.
The RHS is represented by A370820, for prime factors A303975.
Strict case of A371130 (ranks A370802) and A371178 (ranks A371177).
The complement is counted by A371180, non-strict A371132.
A000005 counts divisors.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length.
A305148 counts partitions without divisors, strict A303362, ranks A316476.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&SubsetQ[#,Union@@Divisors/@#]&]],{n,0,30}]
Showing 1-10 of 55 results. Next