OFFSET
0,2
COMMENTS
See A210000 for a guide to related sequences.
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
For n > 1, a(n) - a(n-1) = 1 + 4 * n + 8 * A000010(n) + 4 * A018804(n). - Robert Israel, Jan 07 2024
MAPLE
pillai:= proc(n) local i; add(igcd(i, n), i=1..n) end proc:
T:= 16: R:= 1, 16:
for n from 2 to 50 do
v:= 1 + 4*n + 8*numtheory:-phi(n) + 4*pillai(n);
T:= T + v;
R:= R, T;
od:
R; # Robert Israel, Jan 07 2024
MATHEMATICA
a = 1; b = n; z1 = 40;
t[n_] := t[n] = Flatten[Table[w*z - x*y, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
c[n_, k_] := c[n, k] = Count[t[n], k]
c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, 0, 1}]
Table[c1[n, 1], {n, 0, z1}] (* A209992 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 18 2012
STATUS
approved