OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
MATHEMATICA
r = 3 - Sqrt[2]; z = 15;
p[x_] := FractionalPart[x]; f[x_] := Floor[x];
w[n_, k_] := p[r^n] + p[r^k] - p[r^n + r^k]
Flatten[Table[w[n, k], {n, 1, z}, {k, 1, n}]]
(* A194679 *)
TableForm[Table[w[n, k], {n, 1, z}, {k, 1, n}]]
s[n_] := Sum[w[n, k], {k, 1, n}] (* A194680 *)
Table[s[n], {n, 1, 100}]
h[n_, k_] := f[p[n*r] + p[k*r]]
Flatten[Table[h[n, k], {n, 1, z}, {k, 1, n}]]
(* A194681 *)
TableForm[Table[h[n, k], {n, 1, z}, {k, 1, n}]]
t[n_] := Sum[h[n, k], {k, 1, n}]
Table[t[n], {n, 1, 100}] (* A194682 *)
PROG
(PARI) for(n=1, 30, print1(round(sum(k=1, n, frac((3-sqrt(2))^n) + frac((3-sqrt(2))^k) - frac((3-sqrt(2))^n + (3-sqrt(2))^k))), ", ")) \\ G. C. Greubel, Feb 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 01 2011
STATUS
approved