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!)
A290889 Number of partitions of the set of odd numbers {1, 3, ..., 2*n-1} into two subsets such that the absolute difference of the sums of the two subsets is minimized. 2

%I #35 Nov 14 2020 08:35:09

%S 1,1,1,1,2,1,5,4,13,10,38,34,118,103,380,346,1262,1153,4277,3965,

%T 14745,13746,51541,48396,182182,171835,650095,615966,2338706,2223755,

%U 8472697,8082457,30884150,29543309,113189168,108545916,416839177,400623807,1541726967

%N Number of partitions of the set of odd numbers {1, 3, ..., 2*n-1} into two subsets such that the absolute difference of the sums of the two subsets is minimized.

%C Partitioning in equal sums is only possible for n = 4*k-1, k > 1, and the number of such partitions is given by A156700. For the set {1,3} and the other values of n, i.e., for the sets {1,3,5}, {1,3,5,7,9}, {1,3,5,7,9,11,13}, one can use the criterion to split the sets "as well as possible" by choosing those partitions for which the absolute value of the difference of the respective sums of the subset members achieves its minimum.

%H Alois P. Heinz, <a href="/A290889/b290889.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) ~ (3 - (-1)^n) * sqrt(3) * 2^(n - 5/2) / (sqrt(Pi) * n^(3/2)). - _Vaclav Kotesovec_, Sep 18 2017

%e a(1) = 1: {}U{1} with difference 1.

%e a(2) = 1: {1}U{3} with difference 2.

%e a(3) = 1: {1,3}U{5} with difference 1.

%e a(4) = 1 = A156700(2): {1,7}U{3,5} with difference 0.

%e a(5) = 2: {1,3,9}U{5,7} and {1,5,7}U{3,9} with |difference|=1.

%e a(6) = 1 = A156700(3): {1,3,5,9}U{7,11} with difference 0.

%e a(7) = 5: {1,3,5,7,9}U{11,13}, {1,3,9,11}U{5,7,13}, {1,5,7,11}U{3,9,13},

%e {1,11,13}U{3,5,7,9}, {1,3,7,13}U{5,9,11} with |difference|=1.

%p b:= proc(n, i) option remember; `if`(n>i^2, 0,

%p `if`(n=i^2, 1, b(abs(n-2*i+1), i-1)+b(n+2*i-1, i-1)))

%p end:

%p a:= n-> `if`(n<5, 1, (t-> b(t, n)/(2-t))(irem(n, 2))):

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Aug 14 2017

%t b[n_, i_] := b[n, i] = If[n > i^2, 0, If[n == i^2, 1, b[Abs[n - 2i + 1], i - 1] + b[n + 2i - 1, i - 1]]];

%t a[n_] := If[n < 5, 1, b[#, n]/(2-#)&[Mod[n, 2]]];

%t Array[a, 50] (* _Jean-François Alcover_, Nov 14 2020, after _Alois P. Heinz_ *)

%Y Cf. A005408, A058377, A069918, A156700.

%K nonn

%O 1,5

%A _Hugo Pfoertner_, Aug 13 2017

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 August 13 12:01 EDT 2024. Contains 375138 sequences. (Running on oeis4.)