OFFSET
1,8
LINKS
FORMULA
a(n) = Sum_{i=1..floor(n/2)} [d(i) = d(n-i)], where [] is the Iverson bracket and d is the number of divisors of n (A000005).
EXAMPLE
a(14) = 3; There are 3 ways to write 14 as the sum of two numbers with the same number of divisors: 14 = 11+3 (11 and 3 both have 2 divisors), 14 = 8+6 (8 and 6 both have 4 divisors), 14 = 7+7 (7 has 2 divisors).
MATHEMATICA
Table[Sum[KroneckerDelta[DivisorSigma[0, i], DivisorSigma[0, n - i]], {i, Floor[n/2]}], {n, 100}]
PROG
(PARI) a(n) = sum(i=1, n\2, numdiv(i) == numdiv(n-i)); \\ Michel Marcus, Mar 30 2020
(PARI) first(n) = {my(res, v, c); a2182inv = 128; res = vector(n); res[2] = 1; my(v = List(vector(a2182inv, i, List()))); for(i = 2, n, c = numdiv(i); for(i = #v + 1, c, listput(v, List()); ); listput(v[c], i) ); for(i = 1, a2182inv, for(j = 1, #v[i], for(k = j, #v[i], c = v[i][j] + v[i][k]; if(c <= n, res[c]++ ) ) ) ); res } \\ David A. Corneth, Apr 20 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Mar 29 2020
STATUS
approved