OFFSET
1
COMMENTS
Also the sign of the reverse-alternating sum of the partition with Heinz number n.
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).
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.
LINKS
FORMULA
a(n) = a(A046523(n)). - Antti Karttunen, May 06 2022
EXAMPLE
The pre-images of -1, 0, and 1, together with their prime indices, begin:
6: {1,2} 1: {} 2: {1}
10: {1,3} 4: {1,1} 3: {2}
14: {1,4} 9: {2,2} 5: {3}
15: {2,3} 16: {1,1,1,1} 7: {4}
21: {2,4} 25: {3,3} 8: {1,1,1}
22: {1,5} 11: {5}
24: {1,1,1,2} 12: {1,1,2}
26: {1,6} 13: {6}
17: {7}
18: {1,2,2}
19: {8}
20: {1,1,3}
23: {9}
27: {2,2,2}
28: {1,1,4}
29: {10}
30: {1,2,3}
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Sign[Table[ats[primeMS[n]], {n, 100}]]
PROG
(PARI) A344617(n) = ((!issquare(n)) * ((-1)^(1+bigomega(n)))); \\ Antti Karttunen, May 06 2022
CROSSREFS
Positions of nonzeros are A000037.
Positions of 0's are A000290.
Positions of 1's are A026424.
The absolute value is A049240.
Positions of -1's are A119899.
a(n) is the sign of A316524(n).
A000041 counts partitions of 2n with alternating sum 0.
A071321 is the alternating sum of prime factors.
A071322 is the reverse-alternating sum of prime factors.
A103919 counts partitions by sum and alternating sum.
A316523 is the alternating sum of prime multiplicities.
A335433 ranks separable partitions.
A335448 ranks inseparable partitions.
A344606 counts wiggly permutations of prime indices with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344616 is the alternating sum of the reversed prime indices of n.
A344618 gives reverse-alternating sum of standard compositions.
KEYWORD
sign
AUTHOR
Gus Wiseman, Jun 03 2021
EXTENSIONS
More terms from Antti Karttunen, May 06 2022
STATUS
approved