OFFSET
1,1
COMMENTS
According to the reference, a(p*q) = a(p) + a(q) - 2 whenever p and q are distinct primes with p congruent to q modulo 4.
The sequences of indices n where a(n)=2 is {1, 2, 5, 10, 13, 17, 26, ...}, which appears to be A020893 (squarefree sums of two squares). This has been confirmed for the first 500 terms. [John W. Layman, May 16 2011]
LINKS
Walter Blumberg, Problem 11529, Amer. Math. Monthly, 117 (2010), 742.
FORMULA
MAPLE
A175908:=n->3*add(floor(k^2/n), k=1..n)-n^2: seq(A175908(n), n=1..60); # Wesley Ivan Hurt, Jul 10 2014
MATHEMATICA
Table[3 Sum[Floor[k^2/n], {k, n}] - n^2, {n, 60}] (* Wesley Ivan Hurt, Jul 10 2014 *)
PROG
(PARI) a(n) = 3*sum(k=1, n, k^2\n) - n^2; \\ Michel Marcus, Jul 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Oct 14 2010
STATUS
approved