OFFSET
0,3
COMMENTS
From Gus Wiseman, Sep 11 2023: (Start)
Also the number of finite sets of positive integers that can be linearly combined using all positive coefficients to obtain n. For example, the a(1) = 1 through a(7) = 12 sets are:
{1} {1} {1} {1} {1} {1} {1}
{2} {3} {2} {5} {2} {7}
{1,2} {4} {1,2} {3} {1,2}
{1,2} {1,3} {6} {1,3}
{1,3} {1,4} {1,2} {1,4}
{2,3} {1,3} {1,5}
{1,4} {1,6}
{1,5} {2,3}
{2,4} {2,5}
{1,2,3} {3,4}
{1,2,3}
{1,2,4}
(End)
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..100
FORMULA
a(n) = 2^(n-1) - A070880(n). - Alois P. Heinz, Feb 08 2019
a(n) = A365042(n) + 1. - Gus Wiseman, Sep 13 2023
EXAMPLE
The 7 partitions of 5 and their sets of parts are
[ #] partition set of parts
[ 1] [ 1 1 1 1 1 ] {1}
[ 2] [ 2 1 1 1 ] {1, 2}
[ 3] [ 2 2 1 ] {1, 2} (same as before)
[ 4] [ 3 1 1 ] {1, 3}
[ 5] [ 3 2 ] {2, 3}
[ 6] [ 4 1 ] {1, 4}
[ 7] [ 5 ] {5}
so we have a(5) = |{{1}, {1, 2}, {1, 3}, {2, 3}, {1, 4}, {5}}| = 6.
MAPLE
list2set := L -> {op(L)};
a:= N -> list2set(map( list2set, combinat[partition](N) ));
seq(nops(a(n)), n=0..30);
# Yogy Namara (yogy.namara(AT)gmail.com), Jan 13 2010
b:= proc(n, i) option remember; `if`(n=0, {{}}, `if`(i<1, {},
{b(n, i-1)[], seq(map(x->{x[], i}, b(n-i*j, i-1))[], j=1..n/i)}))
end:
a:= n-> nops(b(n, n)):
seq(a(n), n=0..40);
# Alois P. Heinz, Aug 09 2012
MATHEMATICA
Table[Length[Union[Map[Union, IntegerPartitions[n]]]], {n, 1, 30}] (* Geoffrey Critzer, Feb 19 2013 *)
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i < 1, {},
Union@Flatten@{b[n, i - 1], Table[If[Head[#] == List,
Append[#, i]]& /@ b[n - i*j, i - 1], {j, 1, n/i}]}]];
a[n_] := Length[b[n, n]];
a /@ Range[0, 40] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
combp[n_, y_]:=With[{s=Table[{k, i}, {k, y}, {i, 1, Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
Table[Length[Select[Join@@Array[IntegerPartitions, n], UnsameQ@@#&&combp[n, #]!={}&]], {n, 0, 15}] (* Gus Wiseman, Sep 11 2023 *)
PROG
(Haskell)
a066186 = sum . concat . ps 1 where
ps _ 0 = [[]]
ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
-- Reinhard Zumkeller, Jul 13 2013
(Python)
from sympy.utilities.iterables import partitions
def A088314(n): return len({tuple(sorted(set(p))) for p in partitions(n)}) # Chai Wah Wu, Sep 10 2023
CROSSREFS
Cf. A182410.
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Nov 05 2003
EXTENSIONS
More terms and clearer definition from Vladeta Jovovic, Apr 21 2005
STATUS
approved