login
A378450
a(n) is the number of positive numbers k <= sigma(n) that are not a sum of any subset of distinct divisors of n.
3
0, 0, 1, 0, 3, 0, 5, 0, 6, 3, 9, 0, 11, 9, 9, 0, 15, 0, 17, 0, 17, 21, 21, 0, 24, 27, 25, 0, 27, 0, 29, 0, 33, 39, 33, 0, 35, 45, 41, 0, 39, 0, 41, 21, 23, 57, 45, 0, 50, 30, 57, 35, 51, 0, 57, 0, 65, 75, 57, 0, 59, 81, 45, 0, 69, 0, 65, 63, 81, 2, 69, 0, 71, 99, 61, 77, 81, 0, 77, 0, 90, 111, 81, 0, 93, 117, 105
OFFSET
1,5
COMMENTS
Difference between the sum of divisors n and the number of distinct sums of distinct divisors of n.
LINKS
FORMULA
a(n) = A000203(n) - A119347(n).
EXAMPLE
For n = 3, with divisors [1, 3] and sigma(3)=4, only 2 in range 1..4 cannot be represented as a sum of a subset of [1, 3], therefore a(3) = 1.
For n = 15, with divisors [1, 3, 5, 15] and sigma(15) = 24, the subset sums are 1, 3, 1+3, 5, 1+5, 3+5, 1+3+5, 15, 1+15, 3+15, 1+3+15, 5+15, 1+5+15, 3+5+15, 1+3+5+15 i.e., [1, 3, 4, 5, 6, 8, 9, 15, 16, 18, 19, 20, 21, 23, 24], which leaves 2, 7, 10, 11, 12, 13, 14, 17, 22 as unrepresented numbers, therefore a(15) = 9.
PROG
(PARI)
A119347(n) = { my(c=[0]); fordiv(n, d, c = Set(concat(c, vector(#c, i, c[i]+d)))); (#c)-1; };
A378450(n) = (sigma(n)-A119347(n));
CROSSREFS
Cf. A000203, A119347, A237289 (gives the sums of unrepresented numbers), A322860.
Cf. A005153 (positions of 0's), A237287 (of nonzeros), A030057.
Sequence in context: A175919 A086664 A164736 * A349343 A109753 A318517
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 29 2024
STATUS
approved