OFFSET
0,3
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 = 0..100
EXAMPLE
The a(0) = 1 through a(8) = 8 maximal subsets:
{} {1} {1} {2} {1,3} {1,3} {1,3} {1,3,7} {1,3,7}
{2} {1,3} {2,4} {1,5} {1,5} {1,5,7} {1,5,7}
{3,4} {3,4} {2,4,5} {2,4,5} {2,4,5,8}
{2,4,5} {3,4,6} {2,5,7} {2,5,7,8}
{4,5,6} {3,4,6} {3,4,6,8}
{3,6,7} {3,6,7,8}
{4,5,6} {4,5,6,8}
{5,6,7} {5,6,7,8}
An example for n = 15 is {1,5,7,9,13,15}, with prime indices:
1: {}
5: {3}
7: {4}
9: {2,2}
13: {6}
15: {2,3}
None of these prime indices {2,3,4,6} belong to the subset, as required.
MATHEMATICA
maxim[s_]:=Complement[s, Last/@Select[Tuples[s, 2], UnsameQ@@#&&SubsetQ@@#&]];
Table[Length[maxim[Select[Subsets[Range[n]], Intersection[#, PrimePi/@First/@Join@@FactorInteger/@#]=={}&]]], {n, 0, 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, k, pset(k)), d=0); for(i=1, #p, d=bitor(d, p[i]));
my(ismax(b)=my(e=0); forstep(k=#p, 1, -1, if(bittest(b, k), e=bitor(e, p[k]), if(!bittest(e, k) && !bitand(p[k], b), return(0)) )); 1);
((k, b)->if(k>#p, ismax(b), my(f=!bitand(p[k], b)); if(!f || bittest(d, k), self()(k+1, b)) + if(f, self()(k+1, b+(1<<k)))))(1, 0)} \\ Andrew Howroyd, Aug 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 15 2019
EXTENSIONS
Terms a(16) and beyond from Andrew Howroyd, Aug 26 2019
STATUS
approved