OFFSET
1,2
COMMENTS
From Robert Israel, Apr 21 2017: (Start)
If n = p^k for prime p, a(n) = k+1.
If n = p^j*q^k for distinct primes p,q, a(n) = binomial(j+k+2,j+1)-1. (End)
EXAMPLE
The a(12)=9 sets are: {1}, {2}, {3}, {4}, {6}, {12}, {2,3}, {3,4}, {4,6}.
MAPLE
g:= proc(S) local x, Sx; option remember;
if nops(S) = 0 then return {{}} fi;
x:= S[1];
Sx:= subsop(1=NULL, S);
procname(Sx) union map(t -> t union {x}, procname(remove(s -> s mod x = 0 or x mod s = 0, Sx)))
end proc:
f:= proc(n) local F, D;
F:= ifactors(n)[2];
D:= numtheory:-divisors(mul(ithprime(i)^F[i, 2], i=1..nops(F)));
nops(g(D)) - 1;
end proc:
map(f, [$1..100]); # Robert Israel, Apr 21 2017
MATHEMATICA
nn=50;
stableSets[u_, Q_]:=If[Length[u]===0, {{}}, With[{w=First[u]}, Join[stableSets[DeleteCases[u, w], Q], Prepend[#, w]&/@stableSets[DeleteCases[u, r_/; r===w||Q[r, w]||Q[w, r]], Q]]]];
Table[Length[Rest[stableSets[Divisors[n], Divisible]]], {n, 1, nn}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 21 2017
STATUS
approved