The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357633 Half-alternating sum of the partition having Heinz number n. 19
0, 1, 2, 2, 3, 3, 4, 1, 4, 4, 5, 2, 6, 5, 5, 0, 7, 3, 8, 3, 6, 6, 9, 1, 6, 7, 2, 4, 10, 4, 11, 1, 7, 8, 7, 2, 12, 9, 8, 2, 13, 5, 14, 5, 3, 10, 15, 2, 8, 5, 9, 6, 16, 1, 8, 3, 10, 11, 17, 3, 18, 12, 4, 2, 9, 6, 19, 7, 11, 6, 20, 3, 21, 13, 4, 8, 9, 7, 22, 3, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
LINKS
EXAMPLE
The partition with Heinz number 525 is (4,3,3,2) so a(525) = 4 + 3 - 3 - 2 = 2.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]), {i, Length[f]}];
Table[halfats[Reverse[primeMS[n]]], {n, 30}]
CROSSREFS
The original alternating sum is A316524, reverse A344616.
The version for standard compositions is A357622, non-reverse A357621.
The skew-alternating form is A357634, non-reverse A357630.
Positions of zeros are A000583, non-reverse A357631.
The reverse version is A357629.
These partitions are counted by A357637, skew A357638.
A056239 adds up prime indices, row sums of A112798.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.
Sequence in context: A071508 A326031 A357629 * A322997 A367315 A085561
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 09 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 12:14 EDT 2024. Contains 372540 sequences. (Running on oeis4.)