OFFSET
1,4
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
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Sum_{n>=1} A000005(n^2)*x^(2*n)/(1-x^n). - Mircea Merca, Feb 26 2014
MATHEMATICA
a[n_] := DivisorSigma[0, n]^2 - DivisorSigma[0, n^2]; Array[a, 100] (* Amiram Eldar, Apr 25 2024 *)
PROG
(PARI) { for (n=1, 1000, a=numdiv(n)^2 - numdiv(n^2); write("b065814.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 31 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 22 2001
STATUS
approved