cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A002660 a(n) = Sum_{d|n, d <= 3} d^2 + 3*Sum_{d|n, d>3} d.

This page as a plain text file.
%I A002660 M3797 N1549 #48 Mar 09 2023 05:04:21
%S A002660 1,5,10,17,16,32,22,41,37,50,34,80,40,68,70,89,52,113,58,122,94,104,
%T A002660 70,176,91,122,118,164,88,212,94,185,142,158,142,269,112,176,166,266,
%U A002660 124,284,130,248,232,212,142,368,169,275,214,290,160,356,214,356,238,266,178,500,184,284,310,377,250,428,202,374,286
%N A002660 a(n) = Sum_{d|n, d <= 3} d^2 + 3*Sum_{d|n, d>3} d.
%D A002660 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.
%D A002660 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002660 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%F A002660 Conjectured: Inverse Moebius transform of g.f.: (x + 2x^2 + 2x^3 - 2x^4) / (1 - x)^2. - _Sean A. Irvine_, May 16 2014
%F A002660 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
%p A002660 with(numtheory):
%p A002660 A:=proc(s,n) local d,s1,s2;
%p A002660 s1:=0; s2:=0;
%p A002660 for d in divisors(n) do
%p A002660 if d <= s then s1:=s1+d^2 else s2:=s2+d; fi;  od:
%p A002660 s1+s*s2; end;
%p A002660 f:=s->[seq(A(s,n),n=1..80)]; f(3);
%t A002660 a[n_] := DivisorSum[n, If[# <= 3, #^2, 3 #]&];
%t A002660 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Mar 09 2023 *)
%o A002660 (PARI) a(n) = sumdiv(n, d, if (d<=3, d^2) + 3*if (d>3, d)); \\ _Michel Marcus_, Mar 09 2023
%Y A002660 Cf. A000203, A002659, A002791.
%Y A002660 A row of the array in A242639.
%K A002660 nonn
%O A002660 1,2
%A A002660 _N. J. A. Sloane_
%E A002660 Entry revised by _N. J. A. Sloane_, May 21 2014