%I #20 Dec 12 2021 22:55:05
%S 0,0,1,1,1,1,1,2,2,1,1,3,1,1,3,3,1,2,1,3,3,1,1,5,2,1,3,3,1,3,1,4,3,1,
%T 3,5,1,1,3,5,1,3,1,3,5,1,1,7,2,2,3,3,1,3,3,5,3,1,1,7,1,1,5,5,3,3,1,3,
%U 3,3,1,8,1,1,5,3,3,3,1,7,4,1,1,7,3,1,3,5,1,5,3,3,3
%N Number of partitions of n into two parts (s,t) such that (t-s) | n, where s < t.
%C Apparently a(n) = A320111(n) - 1. - _Hugo Pfoertner_, Oct 30 2020
%C The above observation is true, which can be seen from the formula A320111(2n) = A000005(n), A320111(2n+1) = A000005(2n+1). For odd numbers, the difference (t-s) may range over all the divisors of n except the n itself, and for even numbers the difference (t-s) [which is always even] may range only over the even divisors of n, except the n itself. Note that A000005(2n) = A000005(n) + A001227(n). - _Antti Karttunen_, Dec 12 2021
%H Antti Karttunen, <a href="/A338117/b338117.txt">Table of n, a(n) for n = 1..20160</a>
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F a(n) = Sum_{i=1..floor((n-1)/2)} (1 - ceiling(n/(n-2*i)) + floor(n/(n-2*i))).
%e a(8) = 2; The partitions of 8 into two parts (s,t) such that s < t are (7,1), (6,2), (5,3) and (4,4). Only the partitions (6,2) and (5,3) have (6-2) | 8 and (5-3) | 8, so a(8) = 2.
%t Table[Sum[(1 - Ceiling[n/(n - 2 i)] + Floor[n/(n - 2 i)]), {i, Floor[(n - 1)/2]}], {n, 100}]
%o (PARI) for(n=1,85,my(j=0);forpart(x=n,if(#x==2,if(x[2]!=x[1]&&!(n%(x[2]-x[1])),j++)));print1(j,", ")) \\ _Hugo Pfoertner_, Oct 30 2020
%o (PARI) A338117(n) = sum(s=1,(n-1)\2,!(n%(n-(2*s)))); \\ _Antti Karttunen_, Dec 12 2021
%Y Cf. A000005, A001227, A320111.
%Y Cf. also A337101, A338021.
%K nonn,easy
%O 1,8
%A _Wesley Ivan Hurt_, Oct 10 2020