login
Triangular array: g(n,k)=number of fractional parts (i*sqrt(2)) in interval [(k-1)/n, k/n], for 1<=i<=2n, 1<=k<=n.
2

%I #5 Mar 30 2012 18:57:42

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

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

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

%N Triangular array: g(n,k)=number of fractional parts (i*sqrt(2)) in interval [(k-1)/n, k/n], for 1<=i<=2n, 1<=k<=n.

%C See A194285.

%e First eight rows:

%e 2

%e 2..2

%e 2..3..1

%e 2..3..1..2

%e 2..2..2..2..2

%e 2..2..2..2..2..2

%e 2..1..3..2..1..3..2

%e 1..3..1..3..1..3..2..2

%t r = Sqrt[2];

%t f[n_, k_, i_] := If[(k - 1)/n <= FractionalPart[i*r] < k/n, 1, 0]

%t g[n_, k_] := Sum[f[n, k, i], {i, 1, 2 n}]

%t TableForm[Table[g[n, k], {n, 1, 14}, {k, 1, n}]]

%t Flatten[%] (* A194286 *)

%Y Cf. A194285.

%K nonn,tabl

%O 1,1

%A _Clark Kimberling_, Aug 21 2011