Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 May 06 2022 20:32:14
%S 0,1,1,0,1,-1,1,1,0,-1,1,1,1,-1,-1,0,1,1,1,1,-1,-1,1,-1,0,-1,1,1,1,1,
%T 1,1,-1,-1,-1,0,1,-1,-1,-1,1,1,1,1,1,-1,1,1,0,1,-1,1,1,-1,-1,-1,-1,-1,
%U 1,-1,1,-1,1,0,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,1,1,0,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1
%N Sign of the alternating sum of the prime indices of n.
%C Also the sign of the reverse-alternating sum of the partition with Heinz number n.
%C The alternating sum of a reversed partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. This is equal to (-1)^(k-1) times the number of odd parts in the conjugate partition. The alternating sum of the prime indices of n is given by A316524(n).
%C 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.
%H Antti Karttunen, <a href="/A344617/b344617.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F a(n) = 0 if n is a square (A000290); otherwise a(n) = (-1)^(k-1), where k = A001222(n).
%F a(n) = a(A046523(n)). - _Antti Karttunen_, May 06 2022
%e The pre-images of -1, 0, and 1, together with their prime indices, begin:
%e 6: {1,2} 1: {} 2: {1}
%e 10: {1,3} 4: {1,1} 3: {2}
%e 14: {1,4} 9: {2,2} 5: {3}
%e 15: {2,3} 16: {1,1,1,1} 7: {4}
%e 21: {2,4} 25: {3,3} 8: {1,1,1}
%e 22: {1,5} 11: {5}
%e 24: {1,1,1,2} 12: {1,1,2}
%e 26: {1,6} 13: {6}
%e 17: {7}
%e 18: {1,2,2}
%e 19: {8}
%e 20: {1,1,3}
%e 23: {9}
%e 27: {2,2,2}
%e 28: {1,1,4}
%e 29: {10}
%e 30: {1,2,3}
%t primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
%t ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
%t Sign[Table[ats[primeMS[n]],{n,100}]]
%o (PARI) A344617(n) = ((!issquare(n)) * ((-1)^(1+bigomega(n)))); \\ _Antti Karttunen_, May 06 2022
%Y Positions of nonzeros are A000037.
%Y Positions of 0's are A000290.
%Y Positions of 1's are A026424.
%Y The absolute value is A049240.
%Y Positions of -1's are A119899.
%Y a(n) is the sign of A316524(n).
%Y A000041 counts partitions of 2n with alternating sum 0.
%Y A056239 adds up prime indices, row sums of A112798.
%Y A071321 is the alternating sum of prime factors.
%Y A071322 is the reverse-alternating sum of prime factors.
%Y A103919 counts partitions by sum and alternating sum.
%Y A316523 is the alternating sum of prime multiplicities.
%Y A335433 ranks separable partitions.
%Y A335448 ranks inseparable partitions.
%Y A344606 counts wiggly permutations of prime indices with twins.
%Y A344610 counts partitions by sum and positive reverse-alternating sum.
%Y A344612 counts partitions by sum and reverse-alternating sum.
%Y A344616 is the alternating sum of the reversed prime indices of n.
%Y A344618 gives reverse-alternating sum of standard compositions.
%Y Cf. A000070, A001222, A046523, A028260, A116406, A124754, A239829, A343938, A344607, A344608, A344609, A344653, A344739.
%K sign
%O 1
%A _Gus Wiseman_, Jun 03 2021
%E More terms from _Antti Karttunen_, May 06 2022