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.
%I A337331 #18 Nov 27 2024 10:05:17 %S A337331 1,2,2,3,2,5,2,4,3,4,2,9,2,4,5,5,2,8,2,6,4,4,2,13,3,4,4,7,2,12,2,6,4, %T A337331 4,4,15,2,4,4,9,2,10,2,6,9,4,2,17,3,6,4,6,2,11,4,10,4,4,2,23,2,4,6,7, %U A337331 4,11,2,6,4,8,2,22,2,4,8,6,4,10,2,12,5,4,2,21,4,4,4,8,2,22,5,6,4,4,4,21,2,6,6,9 %N A337331 Number of pairs of divisors of n, (d1,d2), with d1 <= d2, whose average is an integer and divides n. %C A337331 a(n) >= d(n), where d is the number of divisors of n (A000005). %C A337331 From _Bernard Schott_, Aug 24 2020: (Start) %C A337331 a(n) = 2 if and only if n is prime. %C A337331 Also, a(2^k) = k+1 for k >= 0. (End) %C A337331 Note that the other divisor does not necessarily have to divide the other, for example for n=60, we also have pairs d1=3, d2=5 and d1=4, d2=6 as possible solutions - _Antti Karttunen_, Nov 27 2024 %H A337331 Antti Karttunen, <a href="/A337331/b337331.txt">Table of n, a(n) for n = 1..20000</a> %F A337331 a(n) = Sum_{d1|n, d2|n, d1<=d2, (d1+d2)|(2*n), 2|(d1+d2)} 1. %e A337331 a(6) = 5; The divisors of 6 are {1,2,3,6}. The pairs of divisors, (d1,d2), with d1 <= d2, whose average divides 6 are: (1,1), (1,3), (2,2), (3,3) and (6,6). So a(6) = 5. %e A337331 a(7) = 2; The divisors of 7 are {1,7}. The pairs of divisors, (d1,d2), with d1 <= d2, whose average divides 7 are: (1,1) and (7,7). So a(7) = 2. %e A337331 a(8) = 4; The divisors of 8 are {1,2,4,8}. The pairs of divisors, (d1,d2), with d1 <= d2, whose average divides 8 are: (1,1), (2,2), (4,4), and (8,8). So a(8) = 4. %e A337331 a(9) = 3; The divisors of 9 are {1,3,9}. The pairs of divisors, (d1,d2), with d1 <= d2, whose average divides 9 are: (1,1), (3,3) and (9,9). So a(9) = 3. %t A337331 Table[Sum[Sum[(1 - Ceiling[(i + k)/2] + Floor[(i + k)/2]) (1 - Ceiling[2 n/(i + k)] + Floor[2 n/(i + k)]) (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k}], {k, n}], {n, 100}] %o A337331 (PARI) A337331(n) = { my(divs=divisors(n), d1, d2); sum(i=1, #divs, d1=divs[i]; sum(j=i, #divs, d2=divs[j]; !((2*n)%(d1+d2)) * !((d1+d2)%2))); }; \\ _Antti Karttunen_, Nov 27 2024 %Y A337331 Cf. A000005. %K A337331 nonn %O A337331 1,2 %A A337331 _Wesley Ivan Hurt_, Aug 23 2020 %E A337331 Definition and formula clarified, and more terms added by _Antti Karttunen_, Nov 27 2024