login
a(n) = [2*n*e] - 2*[n*e], where [ ] = floor and e is the natural logarithm base.
5

%I #11 Jul 11 2023 08:30:36

%S 1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,

%T 0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,

%U 1,0,1,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,1,1,0,0,1,1,0,1,1,0,0,1

%N a(n) = [2*n*e] - 2*[n*e], where [ ] = floor and e is the natural logarithm base.

%C Suppose, in general, that a(n) = [(b*n+c)r] - b*[n*r] - [c*r]. If r > 0 and b and c are integers satisfying b >= 2 and 0 <= c <= b-1, then 0 <= a(n) <= b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1, 2, ..., b. These b+1 (or b) position sequences comprise a partition of the positive integers.

%t f[n_] := Floor[2 n*E] - 2*Floor[n*E];

%t t = Table[f[n], {n, 1, 220}] (* A190843 *)

%t Flatten[Position[t, 0]] (* A190847 *)

%t Flatten[Position[t, 1]] (* A190860 *)

%Y Cf. A001113 (e), A190847, A190860.

%K nonn,easy

%O 1

%A _Clark Kimberling_, May 26 2011