A119347 Number of distinct sums of distinct divisors of n. Here 0 (as the sum of an empty subset) is excluded from the count.
1, 3, 3, 7, 3, 12, 3, 15, 7, 15, 3, 28, 3, 15, 15, 31, 3, 39, 3, 42, 15, 15, 3, 60, 7, 15, 15, 56, 3, 72, 3, 63, 15, 15, 15, 91, 3, 15, 15, 90, 3, 96, 3, 63, 55, 15, 3, 124, 7, 63, 15, 63, 3, 120, 15, 120, 15, 15, 3, 168, 3, 15, 59, 127, 15, 144, 3, 63, 15, 142, 3, 195, 3, 15, 63, 63
Offset: 1
Keywords
Examples
a(5)=3 because the divisors of 5 are 1 and 5 and all the possible sums: are 1,5 and 6; a(6)=12 because we can form all sums 1,2,...,12 by adding up the terms of a nonempty subset of the divisors 1,2,3,6 of 6.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000 (first 10000 terms from T. D. Noe)
- Jon Maiga, Computer-generated formulas for A119347, Sequence Machine.
- B. M. Stewart, Sums of distinct divisors, American Journal of Mathematics 76 (1954), pp. 779-785.
Crossrefs
Programs
-
Haskell
import Data.List (subsequences, nub) a119347 = length . nub . map sum . tail . subsequences . a027750_row' -- Reinhard Zumkeller, Jun 27 2015
-
Maple
with(numtheory): with(linalg): a:=proc(n) local dl,t: dl:=convert(divisors(n),list): t:=tau(n): nops({seq(innerprod(dl,convert(2^t+i,base,2)[1..t]),i=1..2^t-1)}) end: seq(a(n),n=1..90);
-
Mathematica
a[n_] := Total /@ Rest[Subsets[Divisors[n]]] // Union // Length; Array[a, 100] (* Jean-François Alcover, Jan 27 2018 *)
-
PARI
A119347(n) = { my(p=1); fordiv(n, d, p *= (1 + 'x^d)); sum(i=1,poldegree(p),(0
Antti Karttunen, Nov 28 2024 -
PARI
A119347(n) = { my(c=[0]); fordiv(n, d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; }; \\ after Chai Wah Wu's Python-code, Antti Karttunen, Nov 29 2024
-
Python
from sympy import divisors def A119347(n): c = {0} for d in divisors(n,generator=True): c |= {a+d for a in c} return len(c)-1 # Chai Wah Wu, Jul 05 2023
Formula
For n > 1, 3 <= a(n) <= sigma(n). - Charles R Greathouse IV, Feb 11 2019
For p prime, a(p) = 3. For k >= 0, a(2^k) = 2^(k + 1) - 1. - Ctibor O. Zizka, Oct 19 2023
From Antti Karttunen, Nov 29 2024: (Start)
a(n) = A308605(n)-1.
a(n) <= A100587(n).
(End)
Extensions
Definition clarified by Antti Karttunen, Nov 29 2024
Comments