The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333626 Number of ways to write n as the sum of two positive integers that have the same number of divisors. 3
0, 1, 0, 1, 1, 1, 1, 2, 1, 2, 0, 2, 2, 3, 1, 4, 0, 4, 1, 4, 2, 4, 1, 5, 2, 3, 1, 4, 3, 6, 2, 6, 2, 6, 2, 8, 2, 3, 2, 7, 4, 7, 4, 7, 3, 6, 3, 12, 5, 7, 0, 7, 4, 10, 3, 8, 3, 5, 3, 13, 7, 6, 4, 11, 6, 11, 3, 8, 3, 11, 3, 17, 8, 7, 4, 9, 6, 12, 5, 12, 4, 9, 5 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A112329 A335884 A325033 * A117448 A093321 A302015
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Mar 29 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 26 02:41 EDT 2024. Contains 372807 sequences. (Running on oeis4.)