Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Dec 07 2016 11:42:10
%S 1,2,-10,81,-538,4096,-12010,65536,19683,1048576,-3840010,49268766,
%T -63920218,268435456,1073741824,8546887871,-16921588858,205383589230,
%U -272553384010,3291561314526,4398046511104,17592186044416,-70180457820010,1406245165407356,847288609443
%N a(n) = 3^n + (4^n - 3^n) * (d(n) - 3), where d(n) = A000005(n).
%C a(n) is negative if and only if n is an odd prime (A065091). If n is prime, then a(n) = - A002250(n). If n is a semiprime (A001358), a(n) gives the n-th power of the number of divisors of n. For example, a(4) = d(4)^4 = 3^4 = 81. Similarly, a(6) = d(6)^6 = 4^6 = 4096.
%F a(n) = A000244(n) + A005061(n) * (A000005(n) - 3).
%p with(numtheory); A231919:=n->3^n+(4^n-3^n)*(tau(n)-3); seq(A231919(n), n=1..100);
%t Table[3^n + (4^n - 3^n)(DivisorSigma[0,n] - 3), {n,100}]
%Y Cf. A000005, A002250.
%K sign,easy,less
%O 1,2
%A _Wesley Ivan Hurt_, Nov 15 2013