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 A235799 #57 Sep 08 2022 08:46:06 %S A235799 0,1,5,9,19,24,41,49,68,82,109,116,155,172,201,225,271,285,341,358, %T A235799 409,448,505,516,594,634,689,728,811,828,929,961,1041,1102,1177,1205, %U A235799 1331,1384,1465,1510,1639,1668,1805,1852,1947,2044,2161,2180,2344,2407 %N A235799 a(n) = n^2 - sigma(n). %C A235799 From _Omar E. Pol_, Apr 11 2021: (Start) %C A235799 If n is prime (A000040) then a(n) = n^2 - n - 1. %C A235799 If n is a power of 2 (A000079) then a(n) = (n-1)^2. %C A235799 If n is a perfect number (A000396) then a(n) = (n-1)^2 - 1, assuming there are no odd perfect numbers. %C A235799 In order to construct the diagram of the symmetric representation of a(n) we use the following rules: %C A235799 At stage 1 in the first quadrant of the square grid we draw the symmetric representation of sigma(n) using the two Dyck paths described in the rows n and n-1 of A237593. The area of the region that is below the symmetric representation of sigma(n) equals A024916(n-1). %C A235799 At stage 2 we draw a pair of orthogonal line segments (if it's necessary) such that in the drawing appears totally formed a square n X n. The area of the region that is above the symmetric representation of sigma(n) equals A004125(n). %C A235799 At stage 3 we turn OFF the cells of the symmetric representation of sigma(n). Then we turn ON the rest of the cells that are in the square n X n. The result is that the ON cell form the diagram of the symmetric representation of a(n). See the Example section. (End) %H A235799 Harvey P. Dale, <a href="/A235799/b235799.txt">Table of n, a(n) for n = 1..1000</a> %F A235799 a(n) = A000290(n) - A000203(n). %F A235799 a(n) = A024916(n-1) + A004125(n), n > 1. %F A235799 G.f.: x*(1 + x)/(1 - x)^3 - Sum_{k>=1} x^k/(1 - x^k)^2. - _Ilya Gutkovskiy_, Mar 17 2017 %F A235799 From _Omar E. Pol_, Apr 10 2021: (Start) %F A235799 a(n) = A024816(n) + A000217(n-1). %F A235799 a(n) = A067436(n) + A153485(n) + A244048(n). (End) %e A235799 From _Omar E. Pol, Apr 04 2021: (Start) %e A235799 Illustration of initial terms in the first quadrant for n = 1..6: %e A235799 . %e A235799 . y| _ _ %e A235799 . y| _ _ |_ _ _ |_ | %e A235799 . y| _ |_ _ _| | | | |_| %e A235799 . y| _ |_ _ |_| | _| | |_ _ %e A235799 . y| |_ _|_| | |_ | | | | %e A235799 . y| |_ | | | | | | | | %e A235799 . |_ _ |_|_ _ |_ _|_ _ |_ _ _|_ _ |_ _ _ _|_ _ |_ _ _ _ _|_ _ %e A235799 . x x x x x x %e A235799 . %e A235799 n: 1 2 3 4 5 6 %e A235799 a(n): 0 1 5 9 19 24 %e A235799 . %e A235799 Illustration of initial terms in the first quadrant for n = 7..9: %e A235799 . y| _ _ _ _ %e A235799 . y| _ _ _ |_ _ _ _ _| | %e A235799 . y| _ _ _ |_ _ _ _ | | | _ _ | %e A235799 . |_ _ _ _| | | | |_ | | |_ | | %e A235799 . | | | |_ |_ _| | |_| _| %e A235799 . | _| | |_ _ | | %e A235799 . | | | | | | %e A235799 . | | | | | | %e A235799 . | | | | | | %e A235799 . |_ _ _ _ _ _|_ _ |_ _ _ _ _ _ _|_ _ |_ _ _ _ _ _ _ _|_ _ %e A235799 . x x x %e A235799 . %e A235799 n: 7 8 9 %e A235799 a(n): 41 49 68 %e A235799 . %e A235799 For n = 9 the figures 1, 2 and 3 below show respectively the three stages described in the Comments section as follows: %e A235799 . %e A235799 . y|_ _ _ _ _ 5 y|_ _ _ _ _ _ _ _ _ y| _ _ _ _ %e A235799 . |_ _ _ _ _| |_ _ _ _ _| | |_ _ _ _ _| | %e A235799 . | |_ _ 3 | |_ _ R | | _ _ | %e A235799 . | |_ | | |_ | | | |_ | | %e A235799 . | |_|_ _ 5 | |_|_ _| | |_| _| %e A235799 . | | | | | | | | %e A235799 . | Q | | | Q | | | | %e A235799 . | | | | | | | | %e A235799 . | | | | | | | | %e A235799 . |_ _ _ _ _ _ _ _|_|_ |_ _ _ _ _ _ _ _|_|_ |_ _ _ _ _ _ _ _|_ _ %e A235799 . x x x %e A235799 . Figure 1. Figure 2. Figure 3. %e A235799 . Symmetric Symmetric Symmetric %e A235799 . representation representation representation %e A235799 . of sigma(9) of sigma(9) of a(9) = 68 %e A235799 . A000203(9) = 13 A000203(9) = 13 %e A235799 . and of and of %e A235799 . Q = A024916(8) = 56 R = A004125(9) = 12 %e A235799 . Q = A024916(8) = 56 %e A235799 . %e A235799 Note that the symmetric representation of a(9) contains a hole formed by three cells because these three cells were the central part of the symmetric representation of sigma(9). (End) %t A235799 Table[n^2-DivisorSigma[1,n],{n,50}] (* _Harvey P. Dale_, Sep 02 2016 *) %o A235799 (PARI) vector(50, n, n^2 - sigma(n)) \\ _G. C. Greubel_, Oct 31 2018 %o A235799 (Magma) [n^2 - DivisorSigma(1,n): n in [1..50]]; // _G. C. Greubel_, Oct 31 2018 %Y A235799 Cf. A000040, A000079, A000203, A000217, A000290, A000396, A004125, A024816, A024916, A067436, A120444, A153485, A196020, A236104, A236112, A237593, A244048, A342344. %K A235799 nonn %O A235799 1,3 %A A235799 _Omar E. Pol_, Jan 24 2014