cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A338021 Number of partitions of n into two parts (s,t) such that s <= t and t | s*n.

This page as a plain text file.
%I A338021 #14 Jun 14 2025 11:40:29
%S A338021 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,
%T A338021 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,
%U A338021 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
%N A338021 Number of partitions of n into two parts (s,t) such that s <= t and t | s*n.
%H A338021 Antti Karttunen, <a href="/A338021/b338021.txt">Table of n, a(n) for n = 1..20000</a>
%H A338021 <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F A338021 a(n) = Sum_{i=1..floor(n/2)} (1 - ceiling(n*i/(n-i)) + floor(n*i/(n-i))).
%e A338021 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.
%t A338021 Table[Sum[(1 - Ceiling[n*i/(n - i)] + Floor[n*i/(n - i)]), {i, Floor[n/2]}], {n, 100}]
%t A338021 Table[Count[IntegerPartitions[n,{2}],_?(#[[2]]<=#[[1]]&&Mod[n #[[2]],#[[1]]]==0&)],{n,110}] (* _Harvey P. Dale_, Jun 14 2025 *)
%o A338021 (PARI) A338021(n) = sum(s=1,n\2,!((s*n)%(n-s))); \\ _Antti Karttunen_, Dec 12 2021
%Y A338021 Cf. also A337101, A338117.
%K A338021 nonn
%O A338021 1,6
%A A338021 _Wesley Ivan Hurt_, Oct 06 2020
%E A338021 Data section extended up to 105 terms by _Antti Karttunen_, Dec 12 2021