OFFSET
1,2
FORMULA
a(n) = n^3 - A115077(n).
For squarefree n, a(n) = n^2.
Multiplicative with a(p^e) = p^(e)*(p^(e)+p^(e-1)-p^(ceiling(e/2)-1)).
From Amiram Eldar, Oct 31 2023: (Start)
Dirichlet g.f.: zeta(s-2) * zeta(2*s-3) / zeta(2*s-2).
Sum_{k=1..n} a(k) ~ (zeta(3)/(3*zeta(4))) * n^3. (End)
MATHEMATICA
Table[cnt=0; Do[m={{a, b}, {b, c}}; If[Det[m, Modulus->n]==0, cnt++ ], {a, 0, n-1}, {b, 0, n-1}, {c, 0, n-1}]; cnt, {n, 50}]
f[p_, e_] := p^e*(p^e + p^(e-1) - p^(Ceiling[e/2] - 1)); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 31 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n), p, e); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; p^e*(p^e + p^(e-1) - p^((e+1)\2 - 1))); } \\ Amiram Eldar, Oct 31 2023
CROSSREFS
KEYWORD
mult,nonn,easy
AUTHOR
T. D. Noe, Jan 12 2006
STATUS
approved