A326024 Number of subsets of {1..n} containing no sums or products of distinct elements.
1, 2, 3, 5, 9, 15, 25, 41, 68, 109, 179, 284, 443, 681, 1062, 1587, 2440, 3638, 5443, 8021, 11953, 17273, 25578, 37001, 53953, 77429, 113063, 160636, 232928, 330775, 475380, 672056, 967831, 1359743, 1952235, 2743363, 3918401, 5495993, 7856134, 10984547, 15669741
Offset: 0
Keywords
Examples
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}
Links
- Fausto A. C. Cariboni, Table of n, a(n) for n = 0..80
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Subsets[Range[n]],Intersection[#,Union[Plus@@@Subsets[#,{2,n}],Times@@@Subsets[#,{2,n}]]]=={}&]],{n,0,10}]
-
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<
Andrew Howroyd, Aug 25 2019
Extensions
Terms a(16)-a(40) from Andrew Howroyd, Aug 25 2019