login
Number of k in [1,n] for which <r^n>+<r^k> > 1, where < > = fractional part and r = sqrt(3).
4

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

%S 1,0,0,0,2,0,3,0,2,0,6,0,5,0,8,0,9,0,10,0,11,0,10,0,13,0,11,0,8,0,16,

%T 0,17,0,15,0,19,0,16,0,18,0,21,0,7,0,15,0,9,0,21,0,27,0,28,0,27,0,19,

%U 0,11,0,24,0,29,0,9,0,23,0,18,0,6,0,16,0,39,0,39,0,32,0,2,0,6,0

%N Number of k in [1,n] for which <r^n>+<r^k> > 1, where < > = fractional part and r = sqrt(3).

%t r = Sqrt[3]; z = 13;

%t p[x_] := FractionalPart[x]; f[x_] := Floor[x];

%t w[n_, k_] := p[r^n] + p[r^k] - p[r^n + r^k]

%t Flatten[Table[w[n, k], {n, 1, z}, {k, 1, n}]]

%t TableForm[Table[w[n, k], {n, 1, z}, {k, 1, n}]]

%t s[n_] := Sum[w[n, k], {k, 1, n}] (* A194666 *)

%t Table[s[n], {n, 1, 100}]

%t h[n_, k_] := f[p[n*r] + p[k*r]]

%t Flatten[Table[h[n, k], {n, 1, z}, {k, 1, n}]]

%t (* A194667 *)

%t TableForm[Table[h[n, k], {n, 1, z}, {k, 1, n}]]

%t t[n_] := Sum[h[n, k], {k, 1, n}]

%t Table[t[n], {n, 1, 100}] (* A194668 *)

%K nonn

%O 1,5

%A _Clark Kimberling_, Sep 01 2011