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.

A065814 a(n) = tau(n)^2 - tau(n^2), where tau(n) = A000005(n).

Original entry on oeis.org

0, 1, 1, 4, 1, 7, 1, 9, 4, 7, 1, 21, 1, 7, 7, 16, 1, 21, 1, 21, 7, 7, 1, 43, 4, 7, 9, 21, 1, 37, 1, 25, 7, 7, 7, 56, 1, 7, 7, 43, 1, 37, 1, 21, 21, 7, 1, 73, 4, 21, 7, 21, 1, 43, 7, 43, 7, 7, 1, 99, 1, 7, 21, 36, 7, 37, 1, 21, 7, 37, 1, 109, 1, 7, 21, 21, 7, 37, 1, 73, 16, 7, 1, 99, 7, 7, 7, 43
Offset: 1

Views

Author

Labos Elemer, Nov 22 2001

Keywords

Comments

If n = p^c = power of a prime, then a(n) = (c+1)^2 - (2c+1) = c^2. If n is squarefree with k prime factors then a(n) = 4^k - 3^k, so A065814(A002110(n)) = 4^n - 3^n = A005061(n). Terms depend on prime signature only.
If n is a prime (A000040), then a(n) = 1. If n is a semiprime (A001358), then a(n) = 4 + 3*ceiling(sqrt(n)) - 3*floor(sqrt(n)). If n is a triprime (A014612), then a(n) = 9 * floor(1/omega(n)) + 21 * (1 - (omega(n) mod 2)) + 37 * floor(omega(n)/3), n > 1. - Wesley Ivan Hurt, May 24 2013

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[0, n]^2 - DivisorSigma[0, n^2]; Array[a, 100] (* Amiram Eldar, Apr 25 2024 *)
  • PARI
    a(n) = { numdiv(n)^2 - numdiv(n^2) } \\ Harry J. Smith, Oct 31 2009

Formula

a(n) = A000005(n)^2 - A000005(n^2).
G.f.: Sum_{n>=1} A000005(n^2)*x^(2*n)/(1-x^n). - Mircea Merca, Feb 26 2014
a(n) = A035116(n) - A048691(n). - Amiram Eldar, Apr 25 2024