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

%I #28 Jun 15 2022 19:38:45

%S 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,

%T 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,

%U 3,8,3,11,3,17,8,7,4,9,6,12,5,12,4,9,5

%N Number of ways to write n as the sum of two positive integers that have the same number of divisors.

%H David A. Corneth, <a href="/A333626/b333626.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%F 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).

%e 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).

%t Table[Sum[KroneckerDelta[DivisorSigma[0, i], DivisorSigma[0, n - i]], {i, Floor[n/2]}], {n, 100}]

%o (PARI) a(n) = sum(i=1, n\2, numdiv(i) == numdiv(n-i)); \\ _Michel Marcus_, Mar 30 2020

%o (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

%Y Cf. A000005, A333707.

%K nonn,easy

%O 1,8

%A _Wesley Ivan Hurt_, Mar 29 2020

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 June 17 03:50 EDT 2024. Contains 373432 sequences. (Running on oeis4.)