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

A286889 Sequence generated by the reciprocal of the generating function for A051424.

Original entry on oeis.org

1, -1, -1, 0, 1, 0, 1, -1, 0, 0, 1, -3, 2, 0, 3, -1, -2, -10, 8, 5, 8, -6, -3, -24, 17, 8, 12, -15, 19, -37, 18, -29, 18, 3, 109, -72, -28, -153, 46, 72, 335, -165, -86, -346, 84, -34, 650, -224, 245, -492, -69, -1054, 966, 161
Offset: 0

Views

Author

Maxie D. Schmidt, Aug 04 2017

Keywords

Comments

Inverts A051424 by discrete convolution: Sum_{k=0..n} rpp(k) rpp2(n-k) = delta_{n,0}. This is easy enough to see by the generating function definition of the sequence.

Crossrefs

Cf. A051424.

Programs

  • Mathematica
    (* For all the terms of the sequence A051424 listed in the database, the partial generating function for the sequence is given by:
      rpp2[n_] :=
      SeriesCoefficient[1/(1 + q + 2 q^2 + 3 q^3 + 4 q^4 + 6 q^5 + 7 q^6 + 10 q^7 +
         12 q^8 + 15 q^9 + 18 q^10 + 23 q^11 + 27 q^12 + 33 q^13 +
         38 q^14 + 43 q^15 + 51 q^16 + 60 q^17 + 70 q^18 + 81 q^19 +
         92 q^20 + 102 q^21 + 116 q^22 + 134 q^23 + 153 q^24 + 171 q^25 +
         191 q^26 + 211 q^27 + 236 q^28 + 266 q^29 + 301 q^30 +
         335 q^31 + 367 q^32 + 399 q^33 + 442 q^34 + 485 q^35 +
         542 q^36 + 598 q^37 + 649 q^38 + 704 q^39 + 771 q^40 +
         849 q^41 + 936 q^42 + 1023 q^43 + 1103 q^44 + 1185 q^45 +
         1282 q^46 + 1407 q^47 + 1535 q^48 + 1662 q^49 + 1790 q^50 +
         1917 q^51 + 2063 q^52 + 2245 q^53 + 2436 q^54), {q, 0, n}]
      Table[rpp2[n], {n, 0, 53}] *)
    (* This generating function was created from the original sequence data by the following code: *)
      StringSplit["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", ", "]
      MapIndexed[ToExpression[(#1)] Power[q, First[#2] - 1] &, %]
      Apply[Plus, %]
      TeXForm@PolynomialForm[%, TraditionalOrder -> False]

Formula

Letting rpp(n) := A051424(n), and this sequence equal rpp2(n), we have the following two formulas for Euler's totient function:
phi(n) = Sum_{j=1..n} Sum_{k=1..j-1} Sum_{i=0..j-1-k} rpp_2(n-j) rpp(j-1-k-i) Iverson{(i+k+1, k)=1};
phi(n) = Sum_{d:(d,n)=1} (Sum_{k=1..d+1} Sum_{i=1..d} Sum_{j=2..k} rpp(k-j) rpp_2(i+1-k) mu_{d,i} phi(j)).
I prove that these expressions are correct in an article I have written which motivated the need for this sequence. A proof is available upon reasonable email request.

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

A302696 Numbers whose prime indices (with repetition) are pairwise coprime. Nonprime Heinz numbers of integer partitions with pairwise coprime parts.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 14, 15, 16, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 38, 40, 44, 46, 48, 51, 52, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 74, 76, 77, 80, 82, 85, 86, 88, 92, 93, 94, 95, 96, 102, 104, 106, 110, 112, 116, 118, 119, 120, 122, 123, 124, 128, 132
Offset: 1

Views

Author

Gus Wiseman, Apr 11 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. Two or more numbers are coprime if no pair has a common divisor other than 1. A single number is not considered coprime unless it is equal to 1.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Number 36 = prime(1)*prime(1)*prime(2)*prime(2) is not included in the sequence, because the pair of prime indices {2,2} is not coprime. - Gus Wiseman, Dec 06 2021

Examples

			Sequence of integer partitions with pairwise coprime parts begins: (), (1), (11), (21), (111), (31), (211), (41), (32), (1111), (311), (51), (2111), (61), (411), (321).
Missing from this list are: (2), (3), (4), (22), (5), (6), (7), (221), (8), (42), (9), (33), (222).
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F;
       F:= ifactors(n)[2];
       if nops(F)=1 then if F[1][1] = 2 then return true else return false fi fi;
       if ormap(t -> t[2]>1 and t[1] <> 2, F) then return false fi;
       F:= map(t -> numtheory:-pi(t[1]), F);
       ilcm(op(F))=convert(F,`*`)
    end proc:
    select(filter, [$1..200]); # Robert Israel, Sep 10 2020
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[200],Or[#===1,CoprimeQ@@primeMS[#]]&]
  • PARI
    isA302696(n) = if(isprimepower(n),!(n%2), if(!issquarefree(n>>valuation(n,2)), 0, my(pis=apply(primepi,factor(n)[,1])); (lcm(pis)==factorback(pis)))); \\ Antti Karttunen, Dec 06 2021

Extensions

Clarification (with repetition) added to the definition by Antti Karttunen, Dec 06 2021

A302569 Numbers that are either prime or whose prime indices are pairwise coprime. Heinz numbers of integer partitions with pairwise coprime parts.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 10 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

			Entry A302242 describes a correspondence between positive integers and multiset multisystems. In this case it gives the following sequence of multiset systems.
02: {{}}
03: {{1}}
04: {{},{}}
05: {{2}}
06: {{},{1}}
07: {{1,1}}
08: {{},{},{}}
10: {{},{2}}
11: {{3}}
12: {{},{},{1}}
13: {{1,2}}
14: {{},{1,1}}
15: {{1},{2}}
16: {{},{},{},{}}
17: {{4}}
19: {{1,1,1}}
20: {{},{},{2}}
22: {{},{3}}
23: {{2,2}}
24: {{},{},{},{1}}
26: {{},{1,2}}
28: {{},{},{1,1}}
29: {{1,3}}
30: {{},{1},{2}}
31: {{5}}
32: {{},{},{},{},{}}
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[200],Or[PrimeQ[#],CoprimeQ@@primeMS[#]]&]
  • PARI
    is(n)=if(n<9, return(n>1)); n>>=valuation(n,2); if(n<9, return(1)); my(f=factor(n)); if(vecmax(f[,2])>1, return(0)); if(#f~==1, return(1)); my(v=apply(primepi, f[,1]),P=vecprod(v)); for(i=1,#v, if(gcd(v[i],P/v[i])>1, return(0))); 1 \\ Charles R Greathouse IV, Nov 11 2021

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

A303362 Number of strict integer partitions of n with pairwise indivisible parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 3, 4, 5, 4, 6, 7, 7, 9, 11, 12, 13, 15, 17, 20, 23, 25, 27, 32, 35, 40, 45, 50, 55, 58, 67, 78, 84, 95, 101, 113, 124, 137, 153, 169, 180, 198, 219, 242, 268, 291, 319, 342, 374, 412, 450, 492, 535, 573, 632, 685, 746, 813, 868, 944
Offset: 1

Views

Author

Gus Wiseman, Apr 22 2018

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Select[Tuples[#,2],UnsameQ@@#&&Divisible@@#&]==={}&]],{n,60}]
  • PARI
    lista(nn)={local(Cache=Map());
      my(excl=vector(nn, n, sumdiv(n, d, 2^(n-d))));
      my(a(n, m=n, b=0)=
         if(n==0, 1,
            while(m>n || bittest(b,0), m--; b>>=1);
            my(hk=[n, m, b], z);
            if(!mapisdefined(Cache, hk, &z),
              z = if(m, self()(n, m-1, b>>1) + self()(n-m, m, bitor(b, excl[m])), 0);
              mapput(Cache, hk, z)); z));
       for(n=1, nn, print1(a(n), ", "))
    } \\ Andrew Howroyd, Nov 02 2019

A101268 Number of compositions of n into pairwise relatively prime parts.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 22, 38, 63, 101, 160, 254, 403, 635, 984, 1492, 2225, 3281, 4814, 7044, 10271, 14889, 21416, 30586, 43401, 61205, 85748, 119296, 164835, 226423, 309664, 422302, 574827, 781237, 1060182, 1436368, 1942589, 2622079, 3531152, 4742316, 6348411
Offset: 0

Views

Author

Vladeta Jovovic, Dec 18 2004

Keywords

Comments

Here a singleton is always considered pairwise relatively prime. Compare to A337462. - Gus Wiseman, Oct 18 2020

Examples

			From _Gus Wiseman_, Oct 18 2020: (Start)
The a(1) = 1 through a(5) = 13 compositions:
  (1)  (2)   (3)    (4)     (5)
       (11)  (12)   (13)    (14)
             (21)   (31)    (23)
             (111)  (112)   (32)
                    (121)   (41)
                    (211)   (113)
                    (1111)  (131)
                            (311)
                            (1112)
                            (1121)
                            (1211)
                            (2111)
                            (11111)
(End)
		

Crossrefs

Row sums of A282748.
A051424 is the unordered version, with strict case A007360.
A335235 ranks these compositions.
A337461 counts these compositions of length 3, with unordered version A307719 and unordered strict version A220377.
A337462 does not consider a singleton to be coprime unless it is (1), with strict version A337561.
A337562 is the strict case.
A337664 looks only at distinct parts, with non-constant version A337665.
A000740 counts relatively prime compositions, with strict case A332004.
A178472 counts compositions with a common factor.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]<=1||CoprimeQ@@#&]],{n,0,10}] (* Gus Wiseman, Oct 18 2020 *)

Formula

It seems that no formula is known.

Extensions

a(0)=1 prepended by Alois P. Heinz, Jun 14 2017

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

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

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}]
Showing 1-10 of 97 results. Next