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 A268631 #27 Jan 24 2025 08:43:55 %S A268631 0,0,0,1,0,4,0,5,4,8,0,17,0,12,16,17,0,28,0,33,24,20,0,53,16,24,28,49, %T A268631 0,76,0,49,40,32,48,97,0,36,48,101,0,112,0,81,100,44,0,145,36,96,64, %U A268631 97,0,136,80,149,72,56,0,241,0,60,148,129,96,184,0,129,88,212 %N A268631 Number of ordered pairs (a,b) of positive integers less than n with the property that n divides ab. %C A268631 a(n)=0 iff n is prime or 1. a(n) is odd iff n is a multiple of 4. %H A268631 Antti Karttunen, <a href="/A268631/b268631.txt">Table of n, a(n) for n = 1..20000</a> %F A268631 a(n) = Sum_{k=1..n-1} (number of divisors of nk that are between k and n, exclusive). %F A268631 a(n) = Sum_{k=1..n-1} (number of divisors of nk - 2*(number of divisors of nk that are <= k)). %F A268631 a(n) = A006579(n) - (n-1). - _Michel Marcus_, Feb 09 2016 %F A268631 a(p^k) = (p(k-1)-k)*p^(k-1)+1 for prime p. - _Chai Wah Wu_, May 15 2022 %e A268631 For n=10 the a(10)=8 ordered pairs are (2,5), (5,2), (4,5), (5,4), (5,6), (6,5), (5,8), and (8,5). %t A268631 a[n_] := Sum[Sum[1, {i, Divisors[n*k]}] - 2*Sum[1, {i, TakeWhile[Divisors[n*k], # <= k &]}], {k, 1, n - 1}] %o A268631 (PARI) a(n) = sum(k=1, n-1, sumdiv(n*k, d, (d > k) && (d < n))); \\ _Michel Marcus_, Feb 09 2016 %o A268631 (Python) %o A268631 from math import prod %o A268631 from sympy import factorint %o A268631 def A268631(n): return 1 - 2*n + prod(p**(e-1)*((p-1)*e+p) for p, e in factorint(n).items()) # _Chai Wah Wu_, May 15 2022 %Y A268631 Cf. A006579. %K A268631 nonn %O A268631 1,6 %A A268631 _Matthew McMullen_, Feb 09 2016