OFFSET
2,2
COMMENTS
Row 1 is empty, so offset is 2.
All terms are nonnegative.
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.
The k-based partial alternating sums of a finite sequence q are given by pas(q,k)_j = (-1)^j * k + Sum_{i=1..j} (-1)^(i+j) * q_i. This is a signed version of the partial sums transformation, inverse to the "first sums" transformation.
For example, the partial alternating sums of q = (a,b,c,d,e) are:
pas(q,k)_0 = k
pas(q,k)_1 = -k + a
pas(q,k)_2 = k - a + b
pas(q,k)_3 = -k + a - b + c
pas(q,k)_4 = k - a + b - c + d
pas(q,k)_5 = -k + a - b + c - d + e
These are trimmed by removing the zeroth line (which is always k).
EXAMPLE
The prime indices of 12 are (1,1,2), and pas((1,1,2),0) = (0,1,0,2), so row 12 is (1,0,2).
Triangle begins:
1:
2: 1
3: 2
4: 1 0
5: 3
6: 1 1
7: 4
8: 1 0 1
9: 2 0
10: 1 2
11: 5
12: 1 0 2
13: 6
14: 1 3
15: 2 1
16: 1 0 1 0
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
pas[y_, k_]:=Table[(-1)^j*k+Sum[(-1)^(i-j)*y[[i]], {i, j}], {j, 0, Length[y]}];
Table[Rest[pas[prix[n], 0]], {n, 20}]
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, Dec 26 2025
STATUS
approved
