A338021 Number of partitions of n into two parts (s,t) such that s <= t and t | s*n.
0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 1, 1, 0, 2, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 4, 0, 1, 0, 1, 1, 3, 0, 1, 0, 3, 0, 3, 0, 1, 2, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 3, 0, 1, 0, 6, 0, 1, 1, 1, 0, 3, 0, 1, 0, 3, 0, 4, 0, 1, 1, 1, 1, 2, 0, 3, 0, 1, 0, 6, 0, 1, 0, 2, 0, 6, 1, 1, 0, 1, 0, 3, 0, 1, 1, 2, 0, 2, 0, 2, 2
Offset: 1
Keywords
Examples
a(6) = 2; The partitions of 6 into 2 parts are (1,5), (2,4) and (3,3). Since 4 | 2*6 = 12 and 3 | 3*6 = 18, we have two such partitions.
Links
Programs
-
Mathematica
Table[Sum[(1 - Ceiling[n*i/(n - i)] + Floor[n*i/(n - i)]), {i, Floor[n/2]}], {n, 100}] Table[Count[IntegerPartitions[n,{2}],?(#[[2]]<=#[[1]]&&Mod[n #[[2]],#[[1]]]==0&)],{n,110}] (* _Harvey P. Dale, Jun 14 2025 *)
-
PARI
A338021(n) = sum(s=1,n\2,!((s*n)%(n-s))); \\ Antti Karttunen, Dec 12 2021
Formula
a(n) = Sum_{i=1..floor(n/2)} (1 - ceiling(n*i/(n-i)) + floor(n*i/(n-i))).
Extensions
Data section extended up to 105 terms by Antti Karttunen, Dec 12 2021