OFFSET
1,2
REFERENCES
P. A. MacMahon, The connexion between the sum of the squares of the divisors and the number of partitions of a given number, Messenger Math., 54 (1924), 113-116. Collected Papers, MIT Press, 1978, Vol. I, pp. 1364-1367.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
Conjectured: Inverse Moebius transform of g.f.: (x + 2x^2 + 2x^3 - 2x^4) / (1 - x)^2. - Sean A. Irvine, May 16 2014
a(n) = 3 * sigma(n) - k, where k = 4 if n is even and k = 2 if n is odd. - Sean A. Irvine, May 16 2014
MAPLE
with(numtheory):
A:=proc(s, n) local d, s1, s2;
s1:=0; s2:=0;
for d in divisors(n) do
if d <= s then s1:=s1+d^2 else s2:=s2+d; fi; od:
s1+s*s2; end;
f:=s->[seq(A(s, n), n=1..80)]; f(3);
MATHEMATICA
a[n_] := DivisorSum[n, If[# <= 3, #^2, 3 #]&];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 09 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, if (d<=3, d^2) + 3*if (d>3, d)); \\ Michel Marcus, Mar 09 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Entry revised by N. J. A. Sloane, May 21 2014
STATUS
approved