[go: up one dir, main page]

login
A366737
Number of numbers k <= A056239(n) that can be written as a linear combination of the prime indices of n (allowing coefficients of 0).
2
0, 1, 1, 2, 1, 3, 1, 3, 2, 4, 1, 4, 1, 5, 4, 4, 1, 5, 1, 5, 3, 6, 1, 5, 2, 7, 3, 6, 1, 6, 1, 5, 5, 8, 4, 6, 1, 9, 4, 6, 1, 7, 1, 7, 6, 10, 1, 6, 2, 7, 6, 8, 1, 7, 4, 7, 5, 11, 1, 7, 1, 12, 4, 6, 3, 8, 1, 9, 7, 8, 1, 7, 1, 13, 7, 10, 4, 9, 1, 7, 4, 14, 1, 8, 5
OFFSET
1,4
COMMENTS
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(2n) = A056239(2n) - 1 for n > 0.
EXAMPLE
The prime indices of 33 are {2,5}, with combinations
2 = 2
4 = 2+2
5 = 5
6 = 2+2+2
7 = 5+2
Hence a(33) = 5.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
combs[n_, y_]:=With[{s=Table[{k, i}, {k, y}, {i, 0, Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
Table[Length[Select[Range[Total[prix[n]]], combs[#, prix[n]]!={}&]], {n, 30}]
CROSSREFS
For minimum instead of length we have A055396.
Positions of first appearances are 1, 2, and A100484.
For subsets instead of combinations we have A304793, complement A325799.
A056239 adds up prime indices, row sums of A112798.
A126796 counts complete partitions, ranks A325781, strict A188431.
A276024 counts positive subset-sums of partitions, strict A284640.
A365924 counts incomplete partitions, ranks A365830, strict A365831.
Sequence in context: A326839 A071575 A307908 * A316436 A303674 A038569
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 19 2023
STATUS
approved