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.

A324331 a(n) = (n-1)^2 - phi(n)*sigma(n), where phi is A000010 and sigma is A000203.

Original entry on oeis.org

-1, -2, -4, -5, -8, 1, -12, -11, -14, 9, -20, 9, -24, 25, 4, -23, -32, 55, -36, 25, 16, 81, -44, 49, -44, 121, -44, 57, -56, 265, -60, -47, 64, 225, 4, 133, -72, 289, 100, 81, -80, 529, -84, 169, 64, 441, -92, 225, -90, 541, 196, 249, -104, 649, 36, 145, 256, 729, -116, 793
Offset: 1

Views

Author

Michel Marcus, Feb 23 2019

Keywords

Comments

For squarefree semiprimes n = p*q a(n)=(p-q)^2 is a square. But the converse, a(n) is prime, can happen: see A324332.

Crossrefs

Programs

  • Mathematica
    Table[(n-1)^2 - EulerPhi[n]*DivisorSigma[1, n], {n, 1, 60}] (* Vaclav Kotesovec, Feb 23 2019 *)
  • PARI
    a(n) = (n-1)^2 - eulerphi(n)*sigma(n);

Formula

a(A006881(n)) = A176881(n)^2.
a(n) = A069249(n) - 2*n + 1. - Amiram Eldar, Dec 04 2023