login
A390990
Sum of first sums of the prime indices of n, with a(1) = 0.
16
0, 0, 0, 2, 0, 3, 0, 4, 4, 4, 0, 5, 0, 5, 5, 6, 0, 7, 0, 6, 6, 6, 0, 7, 6, 7, 8, 7, 0, 8, 0, 8, 7, 8, 7, 9, 0, 9, 8, 8, 0, 9, 0, 8, 9, 10, 0, 9, 8, 10, 9, 9, 0, 11, 8, 9, 10, 11, 0, 10, 0, 12, 10, 10, 9, 10, 0, 10, 11, 11, 0, 11, 0, 13, 11, 11, 9, 11, 0, 10
OFFSET
1,4
COMMENTS
The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
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.
FORMULA
a(n > 1) = 2*A056239(n) - A055396(n) - A061395(n) = 2*A056239(n) - A390430(n).
EXAMPLE
The prime indices of 300 are {1,1,2,3,3}, first sums (2,3,5,6), sum 16, so a(300) = 16.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
firsums[c_]:=Table[c[[i]]+c[[i+1]], {i, Length[c]-1}];
Table[Total[firsums[prix[n]]], {n, 100}]
CROSSREFS
For first differences instead of first sums we have A243055, row sums of A355536.
For partial sums instead of first sums we have A318283, row sums of A305936.
These are row sums of A390307, rows reversed A390362, ranks A390449, sorted A390448.
This statistic (sum of first sums) is counted by A390989.
For standard compositions we have A390991, row sums of A390432 (row ranks A390568).
For binary indices instead of prime indices we have A390992.
A112798 lists prime indices, sum A056239.
A124010 gives prime multiplicities (signature).
A390430 adds up first and last prime indices.
Sequence in context: A008808 A008820 A357475 * A391196 A392254 A066682
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 26 2025
STATUS
approved