login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A199919
Number of distinct sums of distinct divisors of n when positive and negative divisors are allowed.
1
3, 7, 9, 15, 9, 25, 9, 31, 27, 37, 9, 57, 9, 49, 49, 63, 9, 79, 9, 85, 65, 49, 9, 121, 27, 49, 81, 113, 9, 145, 9, 127, 81, 49, 69, 183, 9, 49, 81, 181, 9, 193, 9, 169, 157, 49, 9, 249, 27, 187, 81, 197, 9, 241, 69, 241, 81, 49, 9, 337, 9, 49, 209, 255, 81, 289
OFFSET
1,1
LINKS
Bernard Jacobson, Sums of distinct divisors and sums of distinct units, Proc. Amer. Math. Soc. 15 (1964), 179-183
David A. Corneth, PARI program
FORMULA
a(A005153(n)) = 2*sigma(A005153(n)) + 1. - David A. Corneth, May 19 2021
a(p) = 9 for odd primes p. - Antti Karttunen, May 19 2021
EXAMPLE
a(2)=7 because the signed divisors of 2 are -2, -1, 1 and 2 and their all possible sums are -1, -2, -3, 0, 1, 2, 3.
a(3)=9 because the signed divisors of 3 are -3, -1, 1 and 3 and their all possible sums are -1, -2, -3, -4, 0, 1, 2, 3, 4.
MATHEMATICA
dsdd[n_]:=Module[{divs=Divisors[n]}, Length[Union[Total/@Subsets[ Join[ divs, -divs], 2Length[divs]]]]]; Array[dsdd, 70] (* Harvey P. Dale, Jan 19 2015 *)
PROG
(PARI)
A199919(n) = { my(ds=concat(apply(x -> -x, divisors(n)), divisors(n)), m=Map(), s, u=0); for(i=0, (2^#ds)-1, s = sumbybits(ds, i); if(!mapisdefined(m, s), mapput(m, s, s); u++)); (u); }; \\ Slow!
sumbybits(v, b) = { my(s=0, i=1); while(b>0, s += (b%2)*v[i]; i++; b >>= 1); (s); }; \\ Antti Karttunen, May 19 2021
(PARI) See PARI-link \\ David A. Corneth, May 20 2021
CROSSREFS
Sequence in context: A172987 A118556 A279617 * A346303 A178207 A210532
KEYWORD
nonn,look
AUTHOR
Michel Marcus, Dec 22 2012
STATUS
approved