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

A301987 Heinz numbers of integer partitions whose product is equal to their sum.

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 84, 89, 97, 101, 103, 107, 108, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 200, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1

Views

Author

Gus Wiseman, Mar 30 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of reversed integer partitions begins: (1), (2), (3), (4), (2 2), (5), (6), (7), (8), (9), (10), (1 2 3), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20), (21), (22), (23), (1 1 2 4), (24), (25), (26), (27), (28), (1 1 2 2 2), (29), (30).
		

Crossrefs

Programs

  • Maple
    q:= n-> (l-> mul(i, i=l)=add(i, i=l))(map(i->
        numtheory[pi](i[1])$i[2], ifactors(n)[2])):
    select(q, [$1..300])[];  # Alois P. Heinz, Mar 27 2019
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[300],Total[primeMS[#]]===Times@@primeMS[#]&]

A304793 Number of distinct positive subset-sums of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 4, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 5, 2, 3, 3, 5, 1, 6, 1, 5, 3, 3, 3, 6, 1, 3, 3, 6, 1, 7, 1, 5, 5, 3, 1, 6, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 7, 1, 3, 4, 6, 3, 7, 1, 5, 3, 6, 1, 7, 1, 3, 5, 5, 3, 7, 1, 7, 4, 3, 1, 8, 3, 3, 3, 7, 1, 8, 3, 5, 3, 3, 3, 7, 1, 5, 5, 8, 1, 7, 1, 7, 7
Offset: 1

Views

Author

Gus Wiseman, May 18 2018

Keywords

Comments

A positive integer n is a positive subset-sum of an integer partition y if there exists a submultiset of y with sum n. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
a(n) <= A000005(n).
One less than the number of distinct values obtained when A056239 is applied to all divisors of n. - Antti Karttunen, Jul 01 2018

Examples

			The positive subset-sums of (4,3,1) are {1, 3, 4, 5, 7, 8} so a(70) = 6.
The positive subset-sums of (5,1,1,1) are {1, 2, 3, 5, 6, 7, 8} so a(88) = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[Total/@Rest[Subsets[Join@@Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]]],{n,100}]
  • PARI
    up_to = 65537;
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); }
    v056239 = vector(up_to,n,A056239(n));
    A304793(n) = { my(m=Map(),s,k=0); fordiv(n,d,if(!mapisdefined(m,s = v056239[d]), mapput(m,s,s); k++)); (k-1); }; \\ Antti Karttunen, Jul 01 2018

Extensions

More terms from Antti Karttunen, Jul 01 2018

A347460 Number of distinct possible alternating products of factorizations of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 2, 2, 2, 7, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 8, 2, 4, 2, 4, 1, 5, 2, 6, 2, 2, 1, 10, 1, 2, 4, 6, 2, 5, 1, 4, 2, 5, 1, 10, 1, 2, 4, 4, 2, 5, 1, 8, 4, 2, 1, 10, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 06 2021

Keywords

Comments

We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.

Examples

			The a(n) alternating products for n = 1, 4, 8, 12, 24, 30, 36, 48, 60, 120:
  1  4  8    12   24   30    36   48    60    120
     1  2    3    6    10/3  9    12    15    30
        1/2  3/4  8/3  5/6   4    16/3  20/3  40/3
             1/3  2/3  3/10  1    3     15/4  15/2
                  3/8  2/15  4/9  3/4   12/5  24/5
                  1/6        1/4  1/3   3/5   10/3
                             1/9  3/16  5/12  5/6
                                  1/12  4/15  8/15
                                        3/20  3/10
                                        1/15  5/24
                                              2/15
                                              3/40
                                              1/30
		

Crossrefs

Positions of 1's are 1 and A000040.
Positions of 2's appear to be A001358.
Positions of 3's appear to be A030078.
Dominates A038548, the version for reverse-alternating product.
Counting only integers gives A046951.
The even-length case is A072670.
The version for partitions (not factorizations) is A347461, reverse A347462.
The odd-length case is A347708.
The length-3 case is A347709.
A001055 counts factorizations (strict A045778, ordered A074206).
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A276024 counts distinct positive subset-sums of partitions, strict A284640.
A292886 counts knapsack factorizations, by sum A293627.
A299701 counts distinct subset-sums of prime indices, positive A304793.
A301957 counts distinct subset-products of prime indices.
A304792 counts distinct subset-sums of partitions.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Union[altprod/@facs[n]]],{n,100}]

A316314 Number of distinct nonempty-subset-averages of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 3, 1, 1, 4, 1, 4, 3, 3, 1, 5, 1, 3, 1, 4, 1, 5, 1, 1, 3, 3, 3, 5, 1, 3, 3, 5, 1, 7, 1, 4, 4, 3, 1, 6, 1, 4, 3, 4, 1, 5, 3, 5, 3, 3, 1, 8, 1, 3, 4, 1, 3, 7, 1, 4, 3, 7, 1, 7, 1, 3, 4, 4, 3, 7, 1, 6, 1, 3, 1, 8, 3, 3, 3, 5, 1, 7, 3, 4, 3, 3, 3, 7, 1, 4, 4, 5, 1, 7, 1, 5, 5
Offset: 1

Views

Author

Gus Wiseman, Jun 29 2018

Keywords

Comments

A rational number q is a nonempty-subset-average of an integer partition y if there exists a nonempty submultiset of y with average q.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(42) = 7 subset-averages of (4,2,1) are 1, 3/2, 2, 7/3, 5/2, 3, 4.
The a(72) = 7 subset-averages of (2,2,1,1,1) are 1, 5/4, 4/3, 7/5, 3/2, 5/3, 2.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Union[Mean/@Rest[Subsets[primeMS[n]]]]],{n,100}]
  • PARI
    up_to = 65537;
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); }
    v056239 = vector(up_to,n,A056239(n));
    A316314(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d>1)&&!mapisdefined(m,s = v056239[d]/bigomega(d)), mapput(m,s,s); k++)); (k); }; \\ Antti Karttunen, Sep 23 2018

Formula

a(n) = A316398(n) - 1.

Extensions

More terms from Antti Karttunen, Sep 23 2018

A347461 Number of distinct possible alternating products of integer partitions of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 10, 12, 16, 19, 23, 27, 34, 41, 49, 57, 67, 78, 91, 106, 125, 147, 166, 187, 215, 245, 277, 317, 357, 405, 460, 524, 592, 666, 740, 829, 928, 1032, 1147, 1273, 1399, 1555, 1713, 1892, 2087, 2298, 2523, 2783, 3070, 3383, 3724, 4104, 4504
Offset: 0

Views

Author

Gus Wiseman, Oct 06 2021

Keywords

Comments

We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).

Examples

			Partitions representing each of the a(7) = 10 alternating products are:
     (7) -> 7
    (61) -> 6
    (52) -> 5/2
   (511) -> 5
    (43) -> 4/3
   (421) -> 2
  (4111) -> 4
   (331) -> 1
   (322) -> 3
  (3211) -> 3/2
		

Crossrefs

The version for alternating sum is A004526.
Counting only integers gives A028310, reverse A347707.
The version for factorizations is A347460, reverse A038548.
The reverse version is A347462.
A000041 counts partitions.
A027187 counts partitions of even length.
A027193 counts partitions of odd length.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A122768 counts distinct submultisets of partitions.
A126796 counts complete partitions.
A293627 counts knapsack factorizations by sum.
A301957 counts distinct subset-products of prime indices.
A304792 counts subset-sums of partitions, positive A276024, strict A284640.
A304793 counts distinct positive subset-sums of prime indices.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.

Programs

  • Mathematica
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Union[altprod/@IntegerPartitions[n]]],{n,0,30}]

A347462 Number of distinct possible reverse-alternating products of integer partitions of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 11, 13, 17, 22, 28, 33, 42, 51, 59, 69, 84, 100, 117, 137, 163, 191, 222, 256, 290, 332, 378, 429, 489, 564, 643, 729, 819, 929, 1040, 1167, 1313, 1473, 1647, 1845, 2045, 2272, 2521, 2785, 3076, 3398, 3744, 4115, 4548, 5010, 5524, 6086
Offset: 0

Views

Author

Gus Wiseman, Oct 06 2021

Keywords

Comments

We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)). The reverse-alternating product is the alternating product of the reversed sequence.

Examples

			Partitions representing each of the a(7) = 11 reverse-alternating products:
     (7) -> 7
    (61) -> 1/6
    (52) -> 2/5
   (511) -> 5
    (43) -> 3/4
   (421) -> 2
  (4111) -> 1/4
   (331) -> 1
   (322) -> 3
  (3211) -> 2/3
  (2221) -> 1/2
		

Crossrefs

The version for non-reverse alternating sum instead of product is A004526.
Counting only integers gives A028310, non-reverse A347707.
The version for factorizations is A038548, non-reverse A347460.
The non-reverse version is A347461.
A000041 counts partitions.
A027187 counts partitions of even length.
A027193 counts partitions of odd length.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A122768 counts distinct submultisets of partitions.
A126796 counts complete partitions.
A293627 counts knapsack factorizations by sum.
A301957 counts distinct subset-products of prime indices.
A304792 counts subset-sums of partitions, positive A276024, strict A284640.
A304793 counts distinct positive subset-sums of prime indices.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.

Programs

  • Mathematica
    revaltprod[q_]:=Product[Reverse[q][[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Union[revaltprod/@IntegerPartitions[n]]],{n,0,30}]

A301988 Nonprime Heinz numbers of integer partitions whose product is equal to their sum.

Original entry on oeis.org

9, 30, 84, 108, 200, 264, 624, 1120, 1440, 1632, 3648, 7040, 8832, 12544, 16128, 20736, 22272, 33280, 47616, 76800, 113664, 157696, 174080, 202752, 251904, 528384, 778240, 1155072, 1490944, 1916928, 2605056, 3440640, 3768320, 3964928, 4423680, 5799936
Offset: 1

Views

Author

Gus Wiseman, Mar 30 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of reversed integer partitions begins: (22), (123), (1124), (11222), (11133), (11125), (111126), (1111134), (11111223), (1111127), (11111128), (111111135), (111111129), (1111111144), (11111111224), (111111112222).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[200000],!PrimeQ[#]&&Total[primeMS[#]]===Times@@primeMS[#]&]

A305611 Number of distinct positive subset-sums of the multiset of prime factors of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 6, 1, 5, 3, 3, 3, 8, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 9, 1, 3, 5, 6, 3, 7, 1, 5, 3, 6, 1, 10, 1, 3, 5, 5, 3, 7, 1, 9, 4, 3, 1, 10, 3, 3
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2018

Keywords

Comments

An integer n is a positive subset-sum of a multiset y if there exists a nonempty submultiset of y with sum n.
One less than the number of distinct values obtained when A001414 is applied to all divisors of n. - Antti Karttunen, Jun 13 2018

Examples

			The a(12) = 5 positive subset-sums of {2, 2, 3} are 2, 3, 4, 5, and 7.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[Total/@Rest[Subsets[Join@@Cases[FactorInteger[n],{p_,k_}:>Table[p,{k}]]]]]],{n,100}]
  • PARI
    up_to = 65537;
    A001414(n) = ((n=factor(n))[, 1]~*n[, 2]); \\ From A001414.
    v001414 = vector(up_to,n,A001414(n));
    A305611(n) = { my(m=Map(),s,k=0); fordiv(n,d,if(!mapisdefined(m,s = v001414[d]), mapput(m,s,s); k++)); (k-1); }; \\ Antti Karttunen, Jun 13 2018
    
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A305611(n):
        fs = factorint(n)
        return len(set(sum(d) for i in range(1,sum(fs.values())+1) for d in multiset_combinations(fs,i))) # Chai Wah Wu, Aug 23 2021

A316556 Number of distinct LCMs of nonempty submultisets of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 1, 3, 2, 3, 2, 1, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 4, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 3, 3, 1, 2, 1, 2, 1, 3, 3, 2, 2, 2, 1, 4, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 4, 1, 2, 5
Offset: 1

Views

Author

Gus Wiseman, Jul 06 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Number of distinct values obtained when A290103 is applied to all divisors of n larger than one. - Antti Karttunen, Sep 25 2018

Examples

			462 is the Heinz number of (5,4,2,1) which has possible LCMs of nonempty submultisets {1,2,4,5,10,20} so a(462) = 6.
		

Crossrefs

Cf. also A304793, A305611, A319685, A319695 for other similarly constructed sequences.

Programs

  • Mathematica
    Table[Length[Union[LCM@@@Rest[Subsets[If[n==1,{},Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]]]]]]],{n,100}]
  • PARI
    A290103(n) = lcm(apply(p->primepi(p),factor(n)[,1]));
    A316556(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d>1)&&!mapisdefined(m,s=A290103(d)), mapput(m,s,s); k++)); (k); }; \\ Antti Karttunen, Sep 25 2018

Extensions

More terms from Antti Karttunen, Sep 25 2018

A347708 Number of distinct possible alternating products of odd-length factorizations of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 2, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 2, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 1, 5, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 1, 5, 1, 1, 2, 2, 1, 2, 1, 4, 2, 1, 1, 5, 1, 1, 1, 3, 1, 3, 1, 2, 1, 1, 1, 5, 1, 2, 2, 3, 1, 2, 1, 3, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 11 2021

Keywords

Comments

We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
Note that it is sufficient to look at only length-1 and length-3 factorizations; cf. A347709.

Examples

			Representative factorizations for each of the a(180) = 7 alternating products:
  (2*2*3*3*5) -> 5
     (2*2*45) -> 45
     (2*3*30) -> 20
     (2*5*18) -> 36/5
     (2*9*10) -> 20/9
     (3*4*15) -> 45/4
        (180) -> 180
		

Crossrefs

The version for partitions is A028310, reverse A347707.
Positions of 1's appear to be A037143 \ {1}.
The even-length version for n > 1 is A072670, strict A211159.
Counting only integers appears to give A293234, with evens A046951.
This is the odd-length case of A347460, reverse A038548.
The any-length version for partitions is A347461, reverse A347462.
The length-3 case is A347709.
A001055 counts factorizations (strict A045778, ordered A074206).
A056239 adds up prime indices, row sums of A112798.
A276024 counts distinct positive subset-sums of partitions.
A292886 counts knapsack factorizations, by sum A293627.
A301957 counts distinct subset-products of prime indices.
A304792 counts distinct subset-sums of partitions.
A347050 = factorizations w/ an alternating permutation, complement A347706.
A347441 counts odd-length factorizations with integer alternating product.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Union[altprod/@Select[facs[n],OddQ[Length[#]]&]]],{n,100}]
  • PARI
    altprod(facs) = prod(i=1,#facs,facs[i]^((-1)^(i-1)));
    A347708aux(n, m=n, facs=List([])) = if(1==n, if((#facs)%2, altprod(facs), 0), my(newfacs, r, rats=List([])); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); r = A347708aux(n/d, d, newfacs); if(r, rats = concat(rats,r)))); (rats));
    A347708(n) = if(1==n,0,#Set(A347708aux(n))); \\ Antti Karttunen, Jan 29 2025

Formula

Conjecture: For n > 1, a(n) = 1 + A347460(n) - A038548(n) + A072670(n).

Extensions

Data section extended to a(105) by Antti Karttunen, Jan 29 2025
Showing 1-10 of 18 results. Next