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.

A228498 a(n) = sigma(n^2) + phi(n^2) - 2n^2.

Original entry on oeis.org

0, 1, 1, 7, 1, 31, 1, 31, 13, 57, 1, 163, 1, 91, 73, 127, 1, 307, 1, 321, 111, 183, 1, 691, 31, 241, 121, 535, 1, 1261, 1, 511, 211, 381, 157, 1591, 1, 463, 273, 1377, 1, 2163, 1, 1131, 781, 651, 1, 2803, 57, 1467, 421, 1513, 1, 2791, 273, 2311, 507, 993, 1, 6253, 1, 1123, 1227, 2047, 343, 4711, 1, 2445, 703
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 23 2013

Keywords

Comments

If n is a prime, p, then a(p) = 1. Proof: a(p) = sigma(p^2) + phi(p^2) - 2p^2 = p^2 + p + 1 + p^2*( 1-(1/p) ) - 2p^2 = p^2 + p + 1 + p^2 - p - 2p^2 = 1.

Examples

			a(6) = 31; sigma(6^2) + phi(6^2) - 2*6^2 = 91 + 12 - 72 = 31.
		

Crossrefs

Cf. A051709 (sequence at n instead of n^2).

Programs

  • Maple
    with(numtheory); seq(sigma(k^2) + phi(k^2) - 2*k^2, k=1..20);
  • Mathematica
    Table[DivisorSigma[1, n^2] + EulerPhi[n^2] - 2*n^2, {n, 100}]
  • PARI
    vector(100, n, sigma(n^2)+eulerphi(n^2)-2*n^2) \\ Altug Alkan, Oct 28 2015

Formula

a(n) = A051709(n^2).
a(n) = A000203(n^2) + A000010(n^2) - 2*n^2.
a(n) = A065764(n) + A002618(n) - A001105(n).
Sum_{k=1..n} a(k) ~ ((5*zeta(3) + 2)/ Pi^2 - 2/3) * n^3. - Amiram Eldar, Dec 03 2023

Extensions

More terms from Antti Karttunen, Oct 30 2017