OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537 (terms 1..1000 from Harry J. Smith)
FORMULA
a(p) = 1 iff p is a prime.
Combinations of d(n), the number of divisors of n (A000005), taken two at a time. If the canonical factorization of n into prime powers is Product p^e(p) then d(n) = Product (e(p) + 1). Therefore a(n) = C(d(n), 2) = d(n)*{ d(n)-1 }/2 which is a triangular number (A000217).
a(n) = Sum_{k|n, i|n, i < k} 1. - Wesley Ivan Hurt, Aug 20 2020
a(n) = Sum_{d|n} A063647(d). - Ridouane Oudra, Apr 15 2023
EXAMPLE
The divisors of 6 are 1, 2, 3 & 6. In unordered pairs they are {1, 2}, {1, 3}, {1, 6}, {2, 3}, {2, 6}, & {3, 6}. Since there are six pairs, a(6) = 6. Also d(6) = 4. 4*3/2 = 6.
MAPLE
with(numtheory): seq(tau(n)*(tau(n)-1)/2, n=1..60); # Ridouane Oudra, Apr 15 2023
MATHEMATICA
Table[ Binomial[ DivisorSigma[0, n], 2], {n, 1, 100}]
PROG
(PARI) { for (n=1, 1000, a=binomial(numdiv(n), 2); write("b066446.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 15 2010
(Haskell)
a066446 = a000217 . subtract 1 . a000005'
-- Reinhard Zumkeller, Sep 08 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Dec 28 2001
STATUS
approved