A320835 a(n) = Sum (-1)^k where the sum is over all multiset partitions of a multiset whose multiplicities are the prime indices of n and k is the number of parts, or factorizations of A181821(n).
1, -1, 0, 0, -1, 0, 1, 1, 1, 1, -1, 1, 1, 0, 0, 1, -1, 0, 2, 1, 1, 1, -2, 0, 1, 0, 0, 0, 2, 0, -2, -2, -1, 1, -1, -2, 3, -1, 1, -2, -3, -2, 3, 0, -3, 1, -4, -5, 1, -1, -2, -1, 5, -5, 1, -3, 1, -1, -5, -4, 5, 1, -1, -9, -2, -1, -6, -1, -3, -2, 7, -7, -8, -2, -2
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..5000
Crossrefs
Programs
-
Maple
with(numtheory): b:= proc(n, k) option remember; `if`(n>k, 0, -1)+`if`(isprime(n), 0, -add(`if`(d>k, 0, b(n/d, d)), d=divisors(n) minus {1, n})) end: a:= n-> `if`(n=1, 1, b(((l-> mul(ithprime(i)^l[i], i=1..nops(l)))( sort(map(i-> pi(i[1])$i[2], ifactors(n)[2]), `>`)))$2)): seq(a(n), n=1..100); # Alois P. Heinz, Oct 23 2018
-
Mathematica
nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,If[n==1,{},Flatten[Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]]]]; sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}]; mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]]; Table[Sum[(-1)^(Length[m]-1),{m,mps[nrmptn[n]]}],{n,30}]
Extensions
More terms from Alois P. Heinz, Oct 21 2018
Comments