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.
%I A242639 #25 Mar 07 2023 10:35:22 %S A242639 1,1,3,1,5,4,1,5,7,7,1,5,10,13,6,1,5,10,17,11,12,1,5,10,21,16,23,8,1, %T A242639 5,10,21,21,32,15,15,1,5,10,21,26,38,22,29,13,1,5,10,21,26,44,29,41, %U A242639 25,18,1,5,10,21,26,50,36,53,37,35,12,1,5,10,21,26,50,43,61,46,50,23,28 %N A242639 Array read by antidiagonals upwards: A(s,n) (s>=1, n >= 1) = Sum_{d|n, d <= s} d^2 + s*Sum_{d|n, d>s} d. %D A242639 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. See Table I. Note that the entry 53 should be 50. %e A242639 The array begins: %e A242639 1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, ... %e A242639 1, 5, 7, 13, 11, 23, 15, 29, 25, 35, 23, 55, ... %e A242639 1, 5, 10, 17, 16, 32, 22, 41, 37, 50, 34, 80, ... %e A242639 1, 5, 10, 21, 21, 38, 29, 53, 46, 65, 45, 102, ... %e A242639 1, 5, 10, 21, 26, 44, 36, 61, 55, 80, 56, 120, ... %e A242639 1, 5, 10, 21, 26, 50, 43, 69, 64, 90, 67, 138, ... %e A242639 1, 5, 10, 21, 26, 50, 50, 77, 73, 100, 78, 150, ... %e A242639 1, 5, 10, 21, 26, 50, 50, 85, 82, 110, 89, 162, ... %e A242639 1, 5, 10, 21, 26, 50, 50, 85, 91, 120, 100, 174, ... %e A242639 1, 5, 10, 21, 26, 50, 50, 85, 91, 130, 111, 186, ... %e A242639 ... %p A242639 # Produces the square array: %p A242639 with(numtheory): %p A242639 A:=proc(s,n) local d,s1,s2; %p A242639 s1:=0; s2:=0; %p A242639 for d in divisors(n) do %p A242639 if d <= s then s1:=s1+d^2 else s2:=s2+d; fi; od: %p A242639 s1+s*s2; end; %p A242639 for s from 1 to 12 do lprint([seq(A(s,n),n=1..12)]); od: %t A242639 A[s_, n_] := DivisorSum[n, If[#<=s, #^2, 0]+If[#>s, s*#, 0]&]; %t A242639 Table[A[s-n+1, n], {s, 1, 12}, {n, 1, s}] // Flatten (* _Jean-François Alcover_, Mar 07 2023 *) %Y A242639 Rows give A000203, A002659, A002660, A002791, A241603, A242643. %Y A242639 Main diagonal is A001157. %Y A242639 See A242640 for the upper triangle of this array. %K A242639 nonn,tabl %O A242639 1,3 %A A242639 _N. J. A. Sloane_, May 21 2014