login
Number of distinct values of Sum_{i=0..n} x(i)*binomial(n,i), where the x(i) have values in 0..4.
6

%I #30 Jan 31 2023 11:20:47

%S 5,9,17,33,65,129,257,513,1025,2049,4089,6705,16327,22689,63573,

%T 130389,261393,277569,1029837,993393,3736239,8378487,16485497,

%U 12937617,49303463,133933765,258521683,532893609,1071289053,666222975,2514048099,2149595937,8785740659,33471017703,62738124385,136742425621

%N Number of distinct values of Sum_{i=0..n} x(i)*binomial(n,i), where the x(i) have values in 0..4.

%C Column 4 of A205542.

%p A205539:= proc(n)

%p local bni,T,i;

%p T:= {0};

%p for i from 0 to n do

%p bni:= binomial(n,i);

%p T:= map(t -> (t,t+bni,t+2*bni,t+3*bni,t+4*bni),T)

%p od:

%p nops(T);

%p end;

%p seq(A205539(n),n=0..19); # _Robert Israel_, Jun 13 2014

%t a[n_] := a[n] = Module[{bni, T, i}, T = {0}; For[i = 0, i <= n, i++, bni = Binomial[n, i]; T = Union@ Flatten@ Map[{#, #+bni, #+2bni, #+3bni, #+4bni}&, T]]; Length[T]];

%t Table[Print[n, " ", a[n]]; a[n], {n, 0, 24}] (* _Jean-François Alcover_, Jan 31 2023, after _Robert Israel_ *)

%Y Cf. A205536, A205537, A205538, A205540, A205541, A205542.

%K nonn

%O 0,1

%A _R. H. Hardin_, Jan 28 2012

%E Typo in name corrected by _Aaron Meyerowitz_, Jun 13 2014

%E a(19)-a(24) from _Robert Israel_, Jun 13 2014

%E a(25)-a(35) from _Bert Dobbelaere_, Sep 15 2019