OFFSET
0,2
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..80
EXAMPLE
The a(0) = 1 through a(5) = 15 subsets:
{} {} {} {} {} {}
{1} {1} {1} {1} {1}
{2} {2} {2} {2}
{3} {3} {3}
{2,3} {4} {4}
{2,3} {5}
{2,4} {2,3}
{3,4} {2,4}
{2,3,4} {2,5}
{3,4}
{3,5}
{4,5}
{2,3,4}
{2,4,5}
{3,4,5}
MATHEMATICA
Table[Length[Select[Subsets[Range[n]], Intersection[#, Union[Plus@@@Subsets[#, {2, n}], Times@@@Subsets[#, {2, n}]]]=={}&]], {n, 0, 10}]
PROG
(PARI)
a(n)={
my(recurse(k, es, ep)=
if(k > n, 1,
my(t = self()(k + 1, es, ep));
if(!bittest(es, k) && !bittest(ep, k),
es = bitor(es, bitand((2<<n)-1, es << k));
forstep(i=n\k, 1, -1, if(bittest(ep, i), ep=bitor(ep, 1<<(k*i))));
t += self()(k + 1, es, ep);
);
t);
);
1 + if(n, recurse(2, 1, 2));
} \\ Andrew Howroyd, Aug 25 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 09 2019
EXTENSIONS
Terms a(16)-a(40) from Andrew Howroyd, Aug 25 2019
STATUS
approved