A325801 Number of divisors of n minus the number of distinct positive subset-sums of the prime indices of n.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Crossrefs
Programs
-
Mathematica
hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p] k]]; Table[DivisorSigma[0,n]-Length[Union[hwt/@Divisors[n]]],{n,100}]
-
PARI
A325801(n) = (numdiv(n) - A299701(n)); A299701(n) = { my(f = factor(n), pids = List([])); for(i=1,#f~, while(f[i,2], f[i,2]--; listput(pids,primepi(f[i,1])))); pids = Vec(pids); my(sv=vector(vecsum(pids))); for(b=1,(2^length(pids))-1,sv[sumbybits(pids,b)] = 1); 1+vecsum(sv); }; \\ Not really an optimal way to count these. sumbybits(v,b) = { my(s=0,i=1); while(b>0,s += (b%2)*v[i]; i++; b >>= 1); (s); }; \\ Antti Karttunen, May 26 2019
Comments