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.

A288693 Number of n-digit biquanimous strings using digits {0,1,...,n}.

This page as a plain text file.
%I A288693 #12 May 17 2022 04:46:38
%S A288693 1,1,3,19,201,2841,48245,939863,20341201,487875964,12830282835,
%T A288693 370205055144,11629998323185,396693714869323,14593231979817751,
%U A288693 576427808563042857
%N A288693 Number of n-digit biquanimous strings using digits {0,1,...,n}.
%C A288693 A biquanimous string is a string whose digits can be split into two groups with equal sums.
%e A288693 a(2) = 3: 00, 11, 22.
%e A288693 a(3) = 19: 000, 011, 022, 033, 101, 110, 112, 121, 123, 132, 202, 211, 213, 220, 231, 303, 312, 321, 330.
%p A288693 b:= proc(n, k, s) option remember;
%p A288693       `if`(n=0, `if`(s={}, 0, 1), add(b(n-1, k, select(y->
%p A288693        y<=(n-1)*k, map(x-> [abs(x-i), x+i][], s))), i=0..k))
%p A288693     end:
%p A288693 a:= n-> b(n$2, {0}):
%p A288693 seq(a(n), n=0..10);
%t A288693 b[n_, k_, s_] := b[n, k, s] = If[n == 0, If[s == {}, 0, 1], Sum[b[n-1, k, Select[Flatten[{Abs[#-i], #+i}& /@ s], # <= (n-1)*k&]], {i, 0, k}]];
%t A288693 a[n_] := b[n, n, {0}];
%t A288693 Table[Print[n, " ", a[n]]; a[n], {n, 0, 10}] (* _Jean-François Alcover_, May 17 2022, after _Alois P. Heinz_ *)
%Y A288693 Main diagonal of A288638.
%K A288693 nonn
%O A288693 0,3
%A A288693 _Alois P. Heinz_, Jun 13 2017