OFFSET
1,2
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..100
EXAMPLE
The a(1) = 1 through a(6) = 16 subsets:
{} {} {} {} {} {}
{2} {2} {2} {2} {2}
{3} {3} {3} {3}
{4} {4} {4}
{2,4} {5} {5}
{3,4} {2,4} {6}
{2,5} {2,4}
{3,4} {2,5}
{4,5} {3,4}
{2,4,5} {3,6}
{4,5}
{4,6}
{5,6}
{2,4,5}
{3,4,6}
{4,5,6}
An example for n = 20 is {4,5,6,12,17,18,19}, with prime indices:
4: {1,1}
5: {3}
6: {1,2}
12: {1,1,2}
17: {7}
18: {1,2,2}
19: {8}
None of these prime indices {1,2,3,7,8} belong to the set, as required.
MATHEMATICA
Table[Length[Select[Subsets[Range[2, n]], Intersection[#, PrimePi/@First/@Join@@FactorInteger/@#]=={}&]], {n, 10}]
PROG
(PARI)
pset(n)={my(b=0, f=factor(n)[, 1]); sum(i=1, #f, 1<<(primepi(f[i])))}
a(n)={my(p=vector(n-1, k, pset(k+1)>>1), d=0); for(i=1, #p, d=bitor(d, p[i]));
((k, b)->if(k>#p, 1, my(t=self()(k+1, b)); if(!bitand(p[k], b), t+=if(bittest(d, k), self()(k+1, b+(1<<k)), t)); t))(1, 0)} \\ Andrew Howroyd, Aug 16 2019
CROSSREFS
The maximal case is A324763. The version for subsets of {1...n} is A324741. The strict integer partition version is A324752. The integer partition version is A324757. The Heinz number version is A324761. An infinite version is A304360.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 15 2019
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Aug 16 2019
STATUS
approved