# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a002791 Showing 1-1 of 1 %I A002791 M3798 N1550 #34 Aug 17 2019 15:48:44 %S A002791 1,5,10,21,21,38,29,53,46,65,45,102,53,89,90,117,69,146,77,161,122, %T A002791 137,93,230,121,161,154,217,117,278,125,245,186,209,189,354,149,233, %U A002791 218,353,165,374,173,329,306,281,189,486,225,365,282,385,213,470,285,473,314,353,237,662,245,377,410,501,333,566,269,497 %N A002791 a(n) = Sum_{d|n, d <= 4} d^2 + 4*Sum_{d|n, d>4} d. %D A002791 Collected Papers, MIT Press, 1978, Vol. I, pp. 1364-1367. %D A002791 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002791 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002791 Amiram Eldar, Table of n, a(n) for n = 1..10000 %H A002791 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. %F A002791 Conjectured: Inverse Moebius transform of g.f.: (x + 2x^2 + 2x^3 + 2x^4 - 3x^4) / (1 - x)^2. - _Sean A. Irvine_, May 16 2014 %F A002791 Conjectured: a(n) = 4 * sigma(n) - f(n mod 6) where f(0) = 10, f(1) = 3, f(2) = 7, f(3) = 6, f(4) = 7, f(5) = 3. - _Sean A. Irvine_, May 17 2014 %p A002791 with(numtheory): %p A002791 A:=proc(s,n) local d,s1,s2; %p A002791 s1:=0; s2:=0; %p A002791 for d in divisors(n) do %p A002791 if d <= s then s1:=s1+d^2 else s2:=s2+d; fi; od: %p A002791 s1+s*s2; end; %p A002791 f:=s->[seq(A(s,n),n=1..80)]; %p A002791 f(4); %t A002791 a[n_] := DivisorSum[n, #^2 &, # < 5 &] + 4 * DivisorSum[n, # &, # > 4 &]; Array[a, 70] (* _Amiram Eldar_, Aug 17 2019 *) %Y A002791 Cf. A002659, A002660. %Y A002791 A row of the array in A242639. %K A002791 nonn %O A002791 1,2 %A A002791 _N. J. A. Sloane_ %E A002791 Edited by _N. J. A. Sloane_, May 21 2014 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE