cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343943 Number of distinct possible alternating sums of permutations of the multiset of prime factors of n.

This page as a plain text file.
%I A343943 #15 Aug 23 2021 13:37:26
%S A343943 1,1,1,1,1,2,1,1,1,2,1,2,1,2,2,1,1,2,1,2,2,2,1,2,1,2,1,2,1,3,1,1,2,2,
%T A343943 2,3,1,2,2,2,1,3,1,2,2,2,1,2,1,2,2,2,1,2,2,2,2,2,1,4,1,2,2,1,2,3,1,2,
%U A343943 2,3,1,3,1,2,2,2,2,3,1,2,1,2,1,4,2,2,2
%N A343943 Number of distinct possible alternating sums of permutations of the multiset of prime factors of n.
%C A343943 First differs from A096825 at a(525) = 3, A096825(525) = 4.
%C A343943 First differs from A345926 at a(90) = 4, A345926(90) = 3.
%C A343943 The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime factors is also the reverse-alternating sum of reversed prime factors.
%C A343943 Also the number of distinct "sums of prime factors" of divisors d|n such that bigomega(d) = bigomega(n)/2 rounded up.
%e A343943 The divisors of 525 with 2 prime factors are: 15, 21, 25, 35, with prime factors {3,5}, {3,7}, {5,5}, {5,7}, with distinct sums {8,10,12}, so a(525) = 3.
%t A343943 prifac[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
%t A343943 Table[Length[Union[Total/@Subsets[prifac[n],{Ceiling[PrimeOmega[n]/2]}]]],{n,100}]
%o A343943 (Python)
%o A343943 from sympy import factorint
%o A343943 from sympy.utilities.iterables import multiset_combinations
%o A343943 def A343943(n):
%o A343943     fs = factorint(n)
%o A343943     return len(set(sum(d) for d in multiset_combinations(fs,(sum(fs.values())+1)//2))) # _Chai Wah Wu_, Aug 23 2021
%Y A343943 The half-length submultisets are counted by A114921.
%Y A343943 Including all multisets of prime factors gives A305611(n) + 1.
%Y A343943 The strict rounded version appears to be counted by A342343.
%Y A343943 The version for prime indices instead of prime factors is A345926.
%Y A343943 A000005 counts divisors, which add up to A000203.
%Y A343943 A001414 adds up prime factors, row sums of A027746.
%Y A343943 A056239 adds up prime indices, row sums of A112798.
%Y A343943 A071321 gives the alternating sum of prime factors (reverse: A071322).
%Y A343943 A097805 counts compositions by alternating (or reverse-alternating) sum.
%Y A343943 A103919 counts partitions by sum and alternating sum (reverse: A344612).
%Y A343943 A108917 counts knapsack partitions, ranked by A299702.
%Y A343943 A276024 and A299701 count positive subset-sums of partitions.
%Y A343943 A316524 gives the alternating sum of prime indices (reverse: A344616).
%Y A343943 A334968 counts subsequence-sums of standard compositions.
%Y A343943 Cf. A008549, A032443, A083399, A096825, A344609, A345957.
%K A343943 nonn
%O A343943 1,6
%A A343943 _Gus Wiseman_, Aug 19 2021