login
Call two divisors of n adjacent if the larger is a prime times the smaller. a(n) is the sum of elements of all pairs of adjacent divisors of n.
4

%I #27 Nov 15 2019 21:32:05

%S 0,3,4,9,6,24,8,21,16,36,12,64,14,48,48,45,18,87,20,96,64,72,24,144,

%T 36,84,52,128,30,216,32,93,96,108,96,229,38,120,112,216,42,288,44,192,

%U 174,144,48,304,64,201,144,224,54,276,144,288,160,180,60,552,62,192,232,189

%N Call two divisors of n adjacent if the larger is a prime times the smaller. a(n) is the sum of elements of all pairs of adjacent divisors of n.

%C The pairs of adjacent divisors of n are counted in A062799(n).

%C For each divisor d of n we can check in how many pairs it occurs. For each prime divisor p of n, see the exponent of p in the factorization of d. If it's positive (p|d) then it occurs once more. If d*p doesn't divide n, add one to the frequency as well. - _David A. Corneth_, Dec 17 2018

%H Antti Karttunen, <a href="/A180253/b180253.txt">Table of n, a(n) for n = 1..20000</a>

%F a(n) = Sum_{d|n} d*Sum_{p|d} (1 + 1/p) where p is restricted to primes.

%F a(n) = Sum_{d|n} A069359(d) + Sum_{d|n} d*A001221(d).

%F a(n) = A323599(n) + A329354(n) = A323599(n) + A328260(n) + A329375(n). - _Antti Karttunen_, Nov 15 2019

%F a(p^k) = (p^k - 1)*(p + 1)/(p - 1).

%F a(p_1*p_2*...*p_m) = m*(p_1 + 1)*(p_2 + 1)*...*(p_m + 1).

%F a(p*q^k) = (p + 1)*(2*q^k + 3*q^(k - 1) + 3*q^(k - 2) + ... + 3*q + 2).

%F a(p*q*r^k) = (p + 1)*(q + 1)*(3*r^k + 4*r^(k - 1) + 4*r^(k - 2) + ... + 4*r + 3) and similar for a larger number of distinct prime factors of n.

%e a(4) = (1 + 2) + (2 + 4) = 9.

%e a(120) = a(3*5*2^3) = 4*6*(3*8 + 4*4 + 4*2 + 3) = 1224.

%t divisorSumPrime[n_] := DivisorSum[n, 1+1/# &, PrimeQ[#] &]; a[n_] := DivisorSum[n, #*divisorSumPrime[#]& ]; Array[a, 70] (* _Amiram Eldar_, Dec 17 2018 *)

%o (PARI) a(n) = sumdiv(n, d, d*sumdiv(d, p, isprime(p)*(1+1/p))); \\ _Michel Marcus_, Dec 17 2018

%o (PARI) a(n) = my(f = factor(n), res = 0); fordiv(n, d, for(i = 1, #f~, v = valuation(d, f[i, 1]); res+=(d * ((v > 0) + (v < f[i, 2]))))); res \\ _David A. Corneth_, Dec 17 2018

%Y Cf. A001221, A062799, A069359, A179926, A180026, A323599, A328260, A329354, A329375.

%K nonn,easy

%O 1,2

%A _Vladimir Shevelev_, Aug 20 2010

%E Definition rephrased, entries checked, one example added. - _R. J. Mathar_, Oct 25 2010