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

A327518 Number of factorizations of A302696(n), the n-th number that is 1, 2, or a nonprime number with pairwise coprime prime indices, into factors > 1 satisfying the same conditions.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 1, 1, 5, 2, 1, 4, 1, 2, 2, 7, 1, 1, 1, 1, 4, 2, 1, 7, 1, 2, 1, 4, 1, 5, 1, 11, 2, 2, 1, 2, 1, 2, 1, 7, 1, 1, 1, 4, 2, 1, 1, 1, 12, 2, 4, 1, 2, 7, 2, 1, 1, 10, 1, 1, 2, 15, 5, 1, 4, 2, 5, 1, 1, 1, 1, 1, 2, 4, 2, 1, 1, 12, 1, 2, 1, 1, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Sep 19 2019

Keywords

Examples

			The a(59) = 10 factorizations of 120 using the allowed factors, together with the corresponding multiset partitions of {1,1,1,2,3}:
  (2*2*2*15)  {{1},{1},{1},{2,3}}
  (2*2*30)    {{1},{1},{1,2,3}}
  (2*4*15)    {{1},{1,1},{2,3}}
  (2*6*10)    {{1},{1,2},{1,3}}
  (2*60)      {{1},{1,1,2,3}}
  (4*30)      {{1,1},{1,2,3}}
  (6*20)      {{1,2},{1,1,3}}
  (8*15)      {{1,1,1},{2,3}}
  (10*12)     {{1,3},{1,1,2}}
  (120)       {{1,1,1,2,3}}
		

Crossrefs

See link for additional cross-references.

Programs

  • Mathematica
    nn=100;
    facsusing[s_,n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsusing[Select[s,Divisible[n/d,#]&],n/d],Min@@#>=d&]],{d,Select[s,Divisible[n,#]&]}]];
    y=Select[Range[nn],#==1||CoprimeQ@@primeMS[#]&];
    Table[Length[facsusing[Rest[y],n]],{n,y}]

A289509 Numbers k such that the gcd of the indices j for which the j-th prime prime(j) divides k is 1.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104
Offset: 1

Views

Author

Christopher J. Smyth, Jul 11 2017

Keywords

Comments

Any integer k in the sequence encodes (by 'Heinz encoding' cf. A056239) a multiset of integers whose gcd is 1, namely the multiset containing r_j copies of j if k factors as Product_j prime(j)^{r_j} with gcd_j j = 1.
Clearly the sequence contains all even numbers and no odd primes or odd prime powers. It also clearly contains all numbers that are divisible by consecutive primes.
The sequence is the list of those k such that A289508(k) = 1.
It is also the list of those k such that A289506(k) = A289507(k).
Heinz numbers of integer partitions with relatively prime parts, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Apr 13 2018

Examples

			6 is a term because 6 = p_1*p_2 and gcd(1,2) = 1.
From _Gus Wiseman_, Apr 13 2018: (Start)
Sequence of integer partitions with relatively prime parts begins:
02 : (1)
04 : (11)
06 : (21)
08 : (111)
10 : (31)
12 : (211)
14 : (41)
15 : (32)
16 : (1111)
18 : (221)
20 : (311)
22 : (51)
24 : (2111)
26 : (61)
28 : (411)
30 : (321)
32 : (11111)
33 : (52)
34 : (71)
35 : (43)
36 : (2211)
38 : (81)
40 : (3111)
(End)
		

Crossrefs

Programs

  • Maple
    p:=1:for ind to 10000 do p:=nextprime(p);primeindex[p]:=ind;od:
    out:=[]:for n from 2 to 100 do m:=[];f:=ifactors(n)[2];g:=0;
    for k to nops(f) do mk:=primeindex[f[k][1]];m:=[op(m),mk];
    g:=gcd(g,mk);od; if g=1 then out:=[op(out),n];fi;od:out;
  • Mathematica
    Select[Range[200],GCD@@PrimePi/@FactorInteger[#][[All,1]]===1&] (* Gus Wiseman, Apr 13 2018 *)
  • PARI
    isok(n) = my(f=factor(n)); gcd(apply(x->primepi(x), f[,1])) == 1; \\ Michel Marcus, Jul 19 2017
    
  • Python
    from sympy import gcd, primepi, primefactors
    def ok(n): return gcd([primepi(p) for p in primefactors(n)]) == 1
    print([n for n in range(1, 151) if ok(n)]) # Indranil Ghosh, Aug 06 2017

A051424 Number of partitions of n into pairwise relatively prime parts.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 10, 12, 15, 18, 23, 27, 33, 38, 43, 51, 60, 70, 81, 92, 102, 116, 134, 153, 171, 191, 211, 236, 266, 301, 335, 367, 399, 442, 485, 542, 598, 649, 704, 771, 849, 936, 1023, 1103, 1185, 1282, 1407, 1535, 1662, 1790, 1917, 2063, 2245, 2436
Offset: 0

Views

Author

Keywords

Examples

			a(4) = 4 since all partitions of 4 consist of relatively prime numbers except 2+2.
The a(6) = 7 partitions with pairwise coprime parts: (111111), (21111), (3111), (321), (411), (51), (6). - _Gus Wiseman_, Apr 14 2018
		

Crossrefs

Number of partitions of n into relatively prime parts = A000837.
Row sums of A282749.

Programs

  • Haskell
    a051424 = length . filter f . partitions where
       f [] = True
       f (p:ps) = (all (== 1) $ map (gcd p) ps) && f ps
       partitions n = ps 1 n where
         ps x 0 = [[]]
         ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
    -- Reinhard Zumkeller, Dec 16 2013
  • Maple
    with(numtheory):
    b:= proc(n, i, s) option remember; local f;
          if n=0 or i=1 then 1
        elif i<2 then 0
        else f:= factorset(i);
             b(n, i-1, select(x->is(xis(x b(n, n, {}):
    seq(a(n), n=0..80);  # Alois P. Heinz, Mar 14 2012
  • Mathematica
    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, # < i &]] + If[i <= n && f ~Intersection~ s == {}, b[n-i, i-1, Select[s ~Union~ f, # < i &]], 0]]]]; a[n_] := b[n, n, {}]; Table[a[n], {n, 0, 54}] (* Jean-François Alcover, Oct 03 2013, translated from Maple, after Alois P. Heinz *)

Formula

log a(n) ~ (2*Pi/sqrt(6)) sqrt(n/log n). - Eric M. Schmidt, Jul 04 2013
Apparently no formula or recurrence is known. - N. J. A. Sloane, Mar 05 2017

Extensions

More precise definition from Vladeta Jovovic, Dec 11 2004

A007359 Number of partitions of n into pairwise coprime parts that are >= 2.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 3, 2, 3, 3, 5, 4, 6, 5, 5, 8, 9, 10, 11, 11, 10, 14, 18, 19, 18, 20, 20, 25, 30, 35, 34, 32, 32, 43, 43, 57, 56, 51, 55, 67, 78, 87, 87, 80, 82, 97, 125, 128, 127, 128, 127, 146, 182, 191, 185, 184, 193, 213, 263, 290, 279, 258, 271, 312, 354, 404, 402
Offset: 0

Views

Author

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

Keywords

Comments

This sequence is of interest for group theory. The partitions counted by a(n) correspond to conjugacy classes of optimal order of the symmetric group of n elements: they have no fixed point, their order is the direct product of their cycle lengths and they are not contained in a subgroup of Sym_p for p < n. A123131 gives the maximum order (LCM) reachable by these partitions.

Examples

			The a(17) = 9 strict partitions into pairwise coprime parts that are greater than 1 are (17), (15,2), (14,3), (13,4), (12,5), (11,6), (10,7), (9,8), (7,5,3,2). - _Gus Wiseman_, Apr 14 2018
		

References

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

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i, s) option remember; local f;
          if n=0 then 1
        elif i<2 then 0
        else f:= factorset(i);
             b(n, i-1, select(x-> is(x is(x b(n, n, {}):
    seq(a(n), n=0..80);  # Alois P. Heinz, Mar 14 2012
  • Mathematica
    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, Feb 17 2014, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],FreeQ[#,1]&&(Length[#]===1||CoprimeQ@@#)&]],{n,20}] (* Gus Wiseman, Apr 14 2018 *)

Formula

a(n) = A051424(n) - A051424(n-1). - 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

A327516 Number of integer partitions of n that are empty, (1), or have at least two parts and these parts are pairwise coprime.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 9, 11, 14, 17, 22, 26, 32, 37, 42, 50, 59, 69, 80, 91, 101, 115, 133, 152, 170, 190, 210, 235, 265, 300, 334, 366, 398, 441, 484, 541, 597, 648, 703, 770, 848, 935, 1022, 1102, 1184, 1281, 1406, 1534, 1661, 1789, 1916, 2062, 2244, 2435
Offset: 0

Views

Author

Gus Wiseman, Sep 19 2019

Keywords

Comments

The Heinz numbers of these partitions are given by A302696.
Note that the definition excludes partitions with repeated parts other than 1 (cf. A038348, A304709).

Examples

			The a(1) = 1 through a(8) = 11 partitions:
  (1)  (11)  (21)   (31)    (32)     (51)      (43)       (53)
             (111)  (211)   (41)     (321)     (52)       (71)
                    (1111)  (311)    (411)     (61)       (431)
                            (2111)   (3111)    (511)      (521)
                            (11111)  (21111)   (3211)     (611)
                                     (111111)  (4111)     (5111)
                                               (31111)    (32111)
                                               (211111)   (41111)
                                               (1111111)  (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

A000837 is the relatively prime instead of pairwise coprime version.
A051424 includes all singletons, with strict case A007360.
A101268 is the ordered version (with singletons).
A302696 ranks these partitions, with complement A335241.
A305713 is the strict case.
A307719 counts these partitions of length 3.
A018783 counts partitions with a common divisor.
A328673 counts pairwise non-coprime partitions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],#=={}||CoprimeQ@@#&]],{n,0,30}]

Formula

For n > 1, a(n) = A051424(n) - 1. - Gus Wiseman, Sep 18 2020

A305713 Number of strict integer partitions of n into pairwise coprime parts.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 3, 4, 4, 5, 7, 8, 9, 10, 9, 12, 16, 18, 20, 21, 20, 23, 31, 36, 36, 37, 39, 44, 54, 64, 68, 65, 63, 74, 85, 99, 112, 106, 105, 121, 144, 164, 173, 166, 161, 178, 221, 252, 254, 254, 254, 272, 327, 372, 375, 368, 376, 405, 475, 552, 568, 536
Offset: 1

Views

Author

Gus Wiseman, Sep 01 2018

Keywords

Examples

			The a(13) = 9 strict partitions are (7,6), (8,5), (9,4), (10,3), (11,2), (12,1), (7,5,1), (5,4,3,1), (7,3,2,1).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&CoprimeQ@@#&]],{n,30}]

A220377 Number of partitions of n into three distinct and mutually relatively prime parts.

Original entry on oeis.org

1, 0, 2, 1, 3, 1, 6, 1, 7, 3, 7, 3, 14, 3, 15, 6, 14, 6, 25, 6, 22, 10, 25, 9, 42, 8, 34, 15, 37, 15, 53, 13, 48, 22, 53, 17, 78, 17, 65, 30, 63, 24, 99, 24, 88, 35, 84, 30, 126, 34, 103, 45, 103, 38, 166, 35, 124, 57, 128, 51, 184, 44, 150, 67, 172, 52, 218
Offset: 6

Views

Author

Carl Najafi, Dec 13 2012

Keywords

Comments

The Heinz numbers of these partitions are the intersection of A005117 (strict), A014612 (triples), and A302696 (coprime). - Gus Wiseman, Oct 14 2020

Examples

			For n=10 we have three such partitions: 1+2+7, 1+4+5 and 2+3+5.
From _Gus Wiseman_, Oct 14 2020: (Start)
The a(6) = 1 through a(20) = 15 triples (empty column indicated by dot, A..H = 10..17):
321  .  431  531  532  731  543  751  743  753  754  971  765  B53  875
        521       541       651       752  951  853  B51  873  B71  974
                  721       732       761  B31  871  D31  954  D51  A73
                            741       851       952       972       A91
                            831       941       B32       981       B54
                            921       A31       B41       A71       B72
                                      B21       D21       B43       B81
                                                          B52       C71
                                                          B61       D43
                                                          C51       D52
                                                          D32       D61
                                                          D41       E51
                                                          E31       F41
                                                          F21       G31
                                                                    H21
(End)
		

Crossrefs

A023022 is the 2-part version.
A101271 is the relative prime instead of pairwise coprime version.
A220377*6 is the ordered version.
A305713 counts these partitions of any length, with Heinz numbers A302797.
A307719 is the non-strict version.
A337461 is the non-strict ordered version.
A337563 is the case with no 1's.
A337605 is the pairwise non-coprime instead of pairwise coprime version.
A001399(n-6) counts strict 3-part partitions, with Heinz numbers A007304.
A008284 counts partitions by sum and length, with strict case A008289.
A318717 counts pairwise non-coprime strict partitions.
A326675 ranks pairwise coprime sets.
A327516 counts pairwise coprime partitions.
A337601 counts 3-part partitions whose distinct parts are pairwise coprime.

Programs

  • Mathematica
    Table[Length@Select[ IntegerPartitions[ n, {3}], #[[1]] != #[[2]] != #[[3]] && GCD[#[[1]], #[[2]]] == 1 && GCD[#[[1]], #[[3]]] == 1 && GCD[#[[2]], #[[3]]] == 1 &], {n, 6, 100}]
    Table[Count[IntegerPartitions[n,{3}],?(CoprimeQ@@#&&Length[ Union[#]] == 3&)],{n,6,100}] (* _Harvey P. Dale, May 22 2020 *)
  • PARI
    a(n)=my(P=partitions(n));sum(i=1,#P,#P[i]==3&&P[i][1]Charles R Greathouse IV, Dec 14 2012

Formula

a(n > 2) = A307719(n) - 1. - Gus Wiseman, Oct 15 2020

A326675 The positions of 1's in the reversed binary expansion of n are pairwise coprime, where a singleton is not coprime unless it is {1}.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 12, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29, 33, 48, 49, 65, 66, 67, 68, 69, 70, 71, 72, 73, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 96, 97, 112, 113, 129, 132, 133, 144, 145, 148, 149, 192, 193, 196, 197, 208, 209, 212
Offset: 1

Views

Author

Gus Wiseman, Jul 17 2019

Keywords

Examples

			41 has reversed binary expansion (1,0,0,1,0,1) with positions of 1's being {1,4,6}, which are not pairwise coprime, so 41 is not in the sequence.
		

Crossrefs

Equals the complement of A131577 in A087087.
Numbers whose prime indices are pairwise coprime are A302696.
Taking relatively prime instead of pairwise coprime gives A291166.

Programs

  • Maple
    extend:= proc(L) local C,c;
      C:= select(t -> andmap(s -> igcd(s,t)=1, L), [$1..L[-1]-1]);
      L, seq(procname([op(L),c]),c=C)
    end proc:
    g:= proc(L) local i;
      add(2^(i-1),i=L)
    end proc:
    map(g, [[1],seq(extend([k])[2..-1], k=2..10)]); # Robert Israel, Jul 19 2019
  • Mathematica
    Select[Range[100],CoprimeQ@@Join@@Position[Reverse[IntegerDigits[#,2]],1]&]
  • PARI
    is(n) = my (p=1); while (n, my (o=1+valuation(n,2)); if (gcd(p,o)>1, return (0), n-=2^(o-1); p*=o)); return (1) \\ Rémy Sigrist, Jul 19 2019

A302796 Squarefree numbers whose prime indices are relatively prime. Nonprime Heinz numbers of strict integer partitions with relatively prime parts.

Original entry on oeis.org

1, 2, 6, 10, 14, 15, 22, 26, 30, 33, 34, 35, 38, 42, 46, 51, 55, 58, 62, 66, 69, 70, 74, 77, 78, 82, 85, 86, 93, 94, 95, 102, 105, 106, 110, 114, 118, 119, 122, 123, 130, 134, 138, 141, 142, 143, 145, 146, 154, 155, 158, 161, 165, 166, 170, 174, 177, 178, 182
Offset: 1

Views

Author

Gus Wiseman, Apr 13 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. Two or more numbers are relatively prime if they have no common divisor other than 1. A single number is not considered relatively prime unless it is equal to 1.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of terms together with their sets of prime indices begins:
01 : {}
02 : {1}
06 : {1,2}
10 : {1,3}
14 : {1,4}
15 : {2,3}
22 : {1,5}
26 : {1,6}
30 : {1,2,3}
33 : {2,5}
34 : {1,7}
35 : {3,4}
38 : {1,8}
42 : {1,2,4}
46 : {1,9}
51 : {2,7}
55 : {3,5}
58 : {1,10}
62 : {1,11}
66 : {1,2,5}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],Or[#===1,SquareFreeQ[#]&&GCD@@PrimePi/@FactorInteger[#][[All,1]]===1]&]
  • PARI
    isok(n) = {if (n == 1, return (1)); if (issquarefree(n), my(f = factor(n)); return (gcd(vector(#f~, k, primepi(f[k,1]))) == 1););} \\ Michel Marcus, Apr 13 2018

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
Showing 1-10 of 77 results. Next