cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A199919 Number of distinct sums of distinct divisors of n when positive and negative divisors are allowed.

This page as a plain text file.
%I A199919 #27 May 23 2021 06:26:57
%S A199919 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,
%T A199919 81,113,9,145,9,127,81,49,69,183,9,49,81,181,9,193,9,169,157,49,9,249,
%U A199919 27,187,81,197,9,241,69,241,81,49,9,337,9,49,209,255,81,289
%N A199919 Number of distinct sums of distinct divisors of n when positive and negative divisors are allowed.
%H A199919 David A. Corneth, <a href="/A199919/b199919.txt">Table of n, a(n) for n = 1..10000</a>
%H A199919 Bernard Jacobson, <a href="http://dx.doi.org/10.1090/S0002-9939-1964-0160746-8">Sums of distinct divisors and sums of distinct units</a>, Proc. Amer. Math. Soc. 15 (1964), 179-183
%H A199919 David A. Corneth, <a href="/A199919/a199919.gp.txt">PARI program</a>
%F A199919 a(A005153(n)) = 2*sigma(A005153(n)) + 1. - _David A. Corneth_, May 19 2021
%F A199919 a(p) = 9 for odd primes p. - _Antti Karttunen_, May 19 2021
%e A199919 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.
%e A199919 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.
%t A199919 dsdd[n_]:=Module[{divs=Divisors[n]},Length[Union[Total/@Subsets[ Join[ divs,-divs],2Length[divs]]]]]; Array[dsdd,70] (* _Harvey P. Dale_, Jan 19 2015 *)
%o A199919 (PARI)
%o A199919 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!
%o A199919 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
%o A199919 (PARI) See PARI-link \\ _David A. Corneth_, May 20 2021
%Y A199919 Cf. A005153, A119347.
%K A199919 nonn,look
%O A199919 1,1
%A A199919 _Michel Marcus_, Dec 22 2012