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.

A357634 Skew-alternating sum of the partition having Heinz number n.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, -1, 0, 2, 5, 0, 6, 3, 1, 0, 7, -1, 8, 1, 2, 4, 9, 1, 0, 5, -2, 2, 10, 0, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 1, 14, 3, -1, 8, 15, 2, 0, -1, 5, 4, 16, -1, 2, 3, 6, 9, 17, 1, 18, 10, 0, 0, 3, 2, 19, 5, 7, 0, 20, 1, 21, 11, -2, 6, 1, 3, 22, 3
Offset: 1

Views

Author

Gus Wiseman, Oct 09 2022

Keywords

Comments

We define the skew-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.

Examples

			The partition with Heinz number 525 is (4,3,3,2) so a(525) = 4 - 3 - 3 + 2 = 0.
		

Crossrefs

The original alternating sum is A316524, reverse A344616.
The non-reverse version is A357630.
The half-alternating form is A357633, non-reverse A357629.
Positions of zeros are A357636, non-reverse A357632.
The version for standard compositions is A357624, non-reverse A357623.
These partitions are counted by A357638, half A357637.
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.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[skats[Reverse[primeMS[n]]],{n,30}]