login
One of a set of five sequences arising in the enumeration of optimal {0,1,-1}-configurations.
5

%I #10 Sep 02 2018 04:12:56

%S 1,1,1,2,1,1,2,1,1,1,1,3,2,2,1,1,1,2,1,2,1,1,3,2,2,2,2,1,1,1,1,1,1,2,

%T 2,2,1,1,2,1,1,1,1,4,3,3,2,2,2,4,2,4,2,2,1,1,1,1,1,1,1,1,1,1,1,2,2,3,

%U 2,2,2,1,1,2,1,3,2,2,1,1,1,2,1,2,1,1,4,3,3,3,3,2,2,2,2,2,2,4,4,4,2

%N One of a set of five sequences arising in the enumeration of optimal {0,1,-1}-configurations.

%H Peter J. Grabner and Clemens Heuberger, <a href="https://doi.org/10.1007/s10623-005-6158-y">On the number of optimal base 2 representations of integers</a>, Des. Codes Cryptogr. 40 (2006), no. 1, 25-39.

%H S. Kropf, S. Wagner, <a href="https://arxiv.org/abs/1605.03654">q-Quasiadditive functions</a>, arXiv:1605.03654 [math.CO], 2016.

%F See Maple code for the five recurrences.

%p for p from 1 to 5 do u[p][0]:=1; od;

%p u[1][1]:=1; u[2][1]:=1; u[3][1]:=0; u[4][1]:=0; u[5][1]:=0;

%p for n from 2 to 100 do

%p if n mod 2 = 0 then

%p u[1][n]:=u[1][n/2]; u[2][n]:=u[1][n/2]; u[3][n]:=u[2][n/2]; u[4][n]:=u[1][n/2]; u[5][n]:=u[4][n/2];

%p else

%p u[1][n]:=u[2][(n-1)/2]+u[4][(n+1)/2]; u[2][n]:=u[3][(n-1)/2]; u[3][n]:=0; u[4][n]:=u[5][(n-1)/2]; u[5][n]:=0;

%p fi;

%p od:

%p [seq(u[1][n],n=0..100)]; # A280747

%p [seq(u[2][n],n=0..100)]; # A280748

%p [seq(u[3][n],n=0..100)]; # A280749

%p [seq(u[4][n],n=0..100)]; # A280750

%p [seq(u[5][n],n=0..100)]; # A280751

%t For[p = 1, p <= 5, p++, u[p][0] = 1]; u[1][1] = 1; u[2][1] = 1; u[3][1] = 0; u[4][1] = 0; u[5][1] = 0;

%t For[n = 2, n <= 100, n++, If[Mod[n, 2] == 0, u[1][n] = u[1][n/2]; u[2][n] = u[1][n/2]; u[3][n] = u[2][n/2]; u[4][n] = u[1][n/2]; u[5][n] = u[4][n/2], u[1][n] = u[2][(n-1)/2] + u[4][(n+1)/2]; u[2][n] = u[3][(n-1)/2]; u[3][n] = 0; u[4][n] = u[5][(n-1)/2]; u[5][n] = 0]];

%t Table[u[1][n], {n, 0, 100}] (* A280747 *)

%t Table[u[2][n], {n, 0, 100}] (* A280748 *)

%t Table[u[3][n], {n, 0, 100}] (* A280749 *)

%t Table[u[4][n], {n, 0, 100}] (* A280750 *)

%t Table[u[5][n], {n, 0, 100}] (* A280751 *) (* _Jean-François Alcover_, Sep 02 2018, from Maple *)

%Y Cf. A280748, A280749, A280750, A280751.

%K nonn

%O 0,4

%A _N. J. A. Sloane_, Jan 14 2017