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.

A161943 Number of different equations that can be made by summing numbers from 1 to n and using every number not more than once.

This page as a plain text file.
%I A161943 #24 Aug 23 2016 21:27:42
%S A161943 0,0,1,3,7,17,43,108,273,708,1867,4955,13256,35790,97340,266240,
%T A161943 732014,2022558,5612579,15634288,43702232,122550885,344661924,
%U A161943 971908613,2747404212,7784038617,22100387619,62869809733,179173559128,511497066733,1462522478549,4188024794407
%N A161943 Number of different equations that can be made by summing numbers from 1 to n and using every number not more than once.
%C A161943 The summands of each side are in increasing order and the minimum of all summands is on the left side.
%H A161943 Alois P. Heinz, <a href="/A161943/b161943.txt">Table of n, a(n) for n = 1..940</a>
%F A161943 a(n) ~ 3^(n+1) / (4*sqrt(Pi)*n^(3/2)). - _Vaclav Kotesovec_, Sep 11 2014
%e A161943 a(3) = 1, as the only equation we can make by summing numbers from the set {1, 2, 3} is 1+2=3. a(4) = 3, as we can make three equations: 1+2=3, 1+3=4, 1+4=2+3.
%p A161943 b:= proc(n, i) option remember; local m; m:= i*(i+1)/2;
%p A161943       if n>m then 0
%p A161943     elif n=m then 1
%p A161943     else b(n, i-1) +b(abs(n-i), i-1) +b(n+i, i-1)
%p A161943       fi
%p A161943     end:
%p A161943 a:= proc(n) option remember;
%p A161943       `if`(n>2, b(n, n-1)+ a(n-1), 0)
%p A161943     end:
%p A161943 seq(a(n), n=1..40); # _Alois P. Heinz_, Aug 31 2009, revised Sep 16 2011
%t A161943 Table[(Length[ Select[Range[0, 3^n - 1], Apply[Plus, Pick[Range[n], PadLeft[IntegerDigits[ #, 3], n], 1]] == Apply[Plus, Pick[Range[n], PadLeft[IntegerDigits[ #, 3], n], 2]] &]] - 1)/ 2, {n, 14}]
%Y A161943 Column k=2 of A196231.
%K A161943 nonn
%O A161943 1,4
%A A161943 _Tanya Khovanova_, Jun 22 2009
%E A161943 More terms from _Alois P. Heinz_, Aug 31 2009