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

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

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

A078374 Number of partitions of n into distinct and relatively prime parts.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 4, 4, 6, 7, 11, 10, 17, 17, 23, 26, 37, 36, 53, 53, 70, 77, 103, 103, 139, 147, 184, 199, 255, 260, 339, 358, 435, 474, 578, 611, 759, 810, 963, 1045, 1259, 1331, 1609, 1726, 2015, 2200, 2589, 2762, 3259, 3509, 4058, 4416, 5119, 5488, 6364, 6882
Offset: 1

Views

Author

Vladeta Jovovic, Dec 24 2002

Keywords

Comments

The Heinz numbers of these partitions are given by A302796, which is the intersection of A005117 (strict) and A289509 (relatively prime). - Gus Wiseman, Oct 18 2020

Examples

			From _Gus Wiseman_, Oct 18 2020: (Start)
The a(1) = 1 through a(13) = 17 partitions (empty column indicated by dot, A = 10, B = 11, C = 12):
  1   .  21   31   32   51    43    53    54    73     65     75     76
                   41   321   52    71    72    91     74     B1     85
                              61    431   81    532    83     543    94
                              421   521   432   541    92     651    A3
                                          531   631    A1     732    B2
                                          621   721    542    741    C1
                                                4321   632    831    643
                                                       641    921    652
                                                       731    5421   742
                                                       821    6321   751
                                                       5321          832
                                                                     841
                                                                     931
                                                                     A21
                                                                     5431
                                                                     6421
                                                                     7321
(End)
		

Crossrefs

Cf. A047966.
A000837 is the not necessarily strict version.
A302796 gives the Heinz numbers of these partitions.
A305713 is the pairwise coprime instead of relatively prime version.
A332004 is the ordered version.
A337452 is the case without 1's.
A000009 counts strict partitions.
A000740 counts relatively prime compositions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&GCD@@#==1&]],{n,15}] (* Gus Wiseman, Oct 18 2020 *)

Formula

Moebius transform of A000009.
G.f.: 1 + Sum_{n>=1} a(n)*x^n/(1 - x^n) = Product_{n>=1} (1 + x^n). - Ilya Gutkovskiy, Apr 26 2017

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

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

A302698 Number of integer partitions of n into relatively prime parts that are all greater than 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 3, 2, 5, 4, 13, 7, 23, 18, 32, 33, 65, 50, 104, 92, 148, 153, 252, 226, 376, 376, 544, 570, 846, 821, 1237, 1276, 1736, 1869, 2552, 2643, 3659, 3887, 5067, 5509, 7244, 7672, 10086, 10909, 13756, 15168, 19195, 20735, 26237, 28708, 35418, 39207
Offset: 1

Views

Author

Gus Wiseman, Apr 11 2018

Keywords

Comments

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 (which is impossible in this case).
The Heinz numbers of these partitions are given by A302697.

Examples

			The a(5) = 1 through a(12) = 7 partitions (empty column indicated by dot):
  (32)  .  (43)   (53)   (54)    (73)    (65)     (75)
           (52)   (332)  (72)    (433)   (74)     (543)
           (322)         (432)   (532)   (83)     (552)
                         (522)   (3322)  (92)     (732)
                         (3222)          (443)    (4332)
                                         (533)    (5322)
                                         (542)    (33222)
                                         (632)
                                         (722)
                                         (3332)
                                         (4322)
                                         (5222)
                                         (32222)
		

Crossrefs

A000837 is the version allowing 1's.
A002865 does not require relative primality.
A302697 gives the Heinz numbers of these partitions.
A337450 is the ordered version.
A337451 is the ordered strict version.
A337452 is the strict version.
A337485 is the pairwise coprime instead of relatively prime version.
A000740 counts relatively prime compositions.
A078374 counts relatively prime strict partitions.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A332004 counts strict relatively prime compositions.
A337561 counts pairwise coprime strict compositions.
A338332 is the case of length 3, with strict case A338333.

Programs

  • Maple
    b:= proc(n, i, g) option remember; `if`(n=0, `if`(g=1, 1, 0),
          `if`(i<2, 0, b(n, i-1, g)+b(n-i, min(n-i, i), igcd(g, i))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=1..60);  # Alois P. Heinz, Apr 12 2018
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],FreeQ[#,1]&&GCD@@#===1&]],{n,30}]
    (* Second program: *)
    b[n_, i_, g_] := b[n, i, g] = If[n == 0, If[g == 1, 1, 0], If[i < 2, 0, b[n, i - 1, g] + b[n - i, Min[n - i, i], GCD[g, i]]]];
    a[n_] := b[n, n, 0];
    Array[a, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

Formula

a(n) = A002865(n) - A018783(n).

Extensions

Extended by Gus Wiseman, Oct 29 2020

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

A307719 Number of partitions of n into 3 mutually coprime parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 1, 3, 2, 4, 2, 7, 2, 8, 4, 8, 4, 15, 4, 16, 7, 15, 7, 26, 7, 23, 11, 26, 10, 43, 9, 35, 16, 38, 16, 54, 14, 49, 23, 54, 18, 79, 18, 66, 31, 64, 25, 100, 25, 89, 36, 85, 31, 127, 35, 104, 46, 104, 39, 167, 36, 125, 58, 129, 52, 185, 45
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 24 2019

Keywords

Comments

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

Examples

			There are 2 partitions of 9 into 3 mutually coprime parts: 7+1+1 = 5+3+1, so a(9) = 2.
There are 4 partitions of 10 into 3 mutually coprime parts: 8+1+1 = 7+2+1 = 5+4+1 = 5+3+2, so a(10) = 4.
There are 2 partitions of 11 into 3 mutually coprime parts: 9+1+1 = 7+3+1, so a(11) = 2.
There are 7 partitions of 12 into 3 mutually coprime parts: 10+1+1 = 9+2+1 = 8+3+1 = 7+4+1 = 6+5+1 = 7+3+2 = 5+4+3, so a(12) = 7.
		

Crossrefs

A023022 is the version for pairs.
A220377 is the strict case, with ordered version A220377*6.
A327516 counts these partitions of any length, with strict version A305713 and Heinz numbers A302696.
A337461 is the ordered version.
A337563 is the case with no 1's.
A337599 is the pairwise non-coprime instead of pairwise coprime version.
A337601 only requires the distinct parts to be pairwise coprime.
A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.
A002865 counts partitions with no 1's, with strict case A025147.
A007359 and A337485 count pairwise coprime partitions with no 1's.
A200976 and A328673 count pairwise non-coprime partitions.

Programs

  • Maple
    N:= 200: # to get a(0)..a(N)
    A:= Array(0..N):
    for a from 1 to N/3 do
      for b from a to (N-a)/2 do
        if igcd(a,b) > 1 then next fi;
        ab:= a*b;
        for c from b to N-a-b do
           if igcd(ab,c)=1 then A[a+b+c]:= A[a+b+c]+1 fi
    od od od:
    convert(A,list); # Robert Israel, May 09 2019
  • Mathematica
    Table[Sum[Sum[Floor[1/(GCD[i, j] GCD[j, n - i - j] GCD[i, n - i - j])], {i, j, Floor[(n - j)/2]}], {j, Floor[n/3]}], {n, 0, 100}]
    Table[Length[Select[IntegerPartitions[n,{3}],CoprimeQ@@#&]],{n,0,100}] (* Gus Wiseman, Oct 15 2020 *)

Formula

a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} [gcd(i,j) * gcd(j,n-i-j) * gcd(i,n-i-j) = 1], where [] is the Iverson bracket.
a(n > 2) = A220377(n) + 1. - Gus Wiseman, Oct 15 2020
Showing 1-10 of 69 results. Next