A193279 Number of distinct sums of distinct proper divisors of n.
0, 1, 1, 3, 1, 6, 1, 7, 3, 7, 1, 16, 1, 7, 7, 15, 1, 21, 1, 22, 7, 7, 1, 36, 3, 7, 7, 28, 1, 42, 1, 31, 7, 7, 7, 55, 1, 7, 7, 50, 1, 54, 1, 31, 27, 7, 1, 76, 3, 31, 7, 31, 1, 66, 7, 64, 7, 7, 1, 108, 1, 7, 29, 63, 7, 78, 1, 31, 7, 72, 1, 123, 1, 7, 31, 31
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000 (first 10000 terms from Amiram Eldar)
Crossrefs
Programs
-
Maple
with(linalg): a:=proc(n) local dl,t: dl:=convert(numtheory[divisors](n) minus {n}, list): t:=nops(dl): return nops({seq(innerprod(dl, convert(2^t+i, base, 2)[1..t]), i=1..2^t-1)}): end: seq(a(n), n=1..76); # Nathaniel Johnston, Jul 23 2011
-
Mathematica
a[n_] := Module[{d = Most @ Divisors[n], x}, Count[CoefficientList[Product[1 + x^i, {i, d}], x], ?(# > 0 &)] - 1]; Array[a, 100] (* _Amiram Eldar, Jun 13 2020 *)
-
PARI
\\ Slow and naive: A193279(n) = if(1==n,0,my(pds = (divisors(n)[1..(numdiv(n)-1)]), maxsum = vecsum(pds), sums = vector(maxsum), psetsiz = (2^length(pds))-1, k = 0, s); for(i=1,psetsiz,s = vecsum(choosebybits(pds,i)); if(!sums[s],k++;sums[s]++)); (k)); \\ Antti Karttunen, Mar 07 2018
-
PARI
A193279(n) = { my(p=1); fordiv(n, d, if(d
Antti Karttunen, Nov 29 2024 -
PARI
A193279(n) = { my(c=[0]); fordiv(n,d, if(d
A119347) - Antti Karttunen, Nov 29 2024
Comments