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!)
A288693 Number of n-digit biquanimous strings using digits {0,1,...,n}. 1
1, 1, 3, 19, 201, 2841, 48245, 939863, 20341201, 487875964, 12830282835, 370205055144, 11629998323185, 396693714869323, 14593231979817751, 576427808563042857 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
A biquanimous string is a string whose digits can be split into two groups with equal sums.
LINKS
EXAMPLE
a(2) = 3: 00, 11, 22.
a(3) = 19: 000, 011, 022, 033, 101, 110, 112, 121, 123, 132, 202, 211, 213, 220, 231, 303, 312, 321, 330.
MAPLE
b:= proc(n, k, s) option remember;
`if`(n=0, `if`(s={}, 0, 1), add(b(n-1, k, select(y->
y<=(n-1)*k, map(x-> [abs(x-i), x+i][], s))), i=0..k))
end:
a:= n-> b(n$2, {0}):
seq(a(n), n=0..10);
MATHEMATICA
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}]];
a[n_] := b[n, n, {0}];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 10}] (* Jean-François Alcover, May 17 2022, after Alois P. Heinz *)
CROSSREFS
Main diagonal of A288638.
Sequence in context: A007151 A269787 A303927 * A195895 A127502 A175176
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 13 2017
STATUS
approved

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 April 23 13:11 EDT 2024. Contains 371913 sequences. (Running on oeis4.)