login
A396957
a(n) = n - Omega(|Re((4 + i)^n)|) - Omega(|Im((4 + i)^n)|), where Omega is A001222.
5
-1, -3, -1, -4, 0, -3, 3, -3, 3, -1, 4, -2, 7, 4, 5, 1, 9, 3, 13, 3, 11, 9, 17, 5, 16, 14, 19, 11, 23, 9, 25, 12, 21, 20, 25, 12, 31, 24, 24, 18, 35, 21, 36, 23, 29, 33, 42, 21, 39, 31, 34, 33, 47, 31, 42, 32, 44, 44, 51, 27, 55, 49, 45, 38, 51, 40, 60, 47, 54
OFFSET
1,2
COMMENTS
Let u(n) + i*v(n) = (4 + i)^n, so that u(n)^2 + v(n)^2 = 17^n, where 17 == 1 (mod 4); such primes admit a representation as a sum of two squares. Then a(n) = n - Omega(u(n)) - Omega(v(n)) = Omega(u(n)^2 + v(n)^2) - Omega(u(n)) - Omega(v(n)). The values u(n) and v(n) can be computed via the recurrence u(n + 1) = 4*u(n) - v(n), v(n + 1) = u(n) + 4*v(n), with u(1) = 4 and v(1) = 1.
Since u(n)^2 + v(n)^2 = 17^n and gcd(u(n), v(n)) = 1 (any common divisor must divide 17^n), the triple (u(n)^2 - v(n)^2, 2*u(n)*v(n), u(n)^2 + v(n)^2) is a primitive Pythagorean triple for all n >= 1.
Thus a(n) compares the additive prime factor count of the norm 17^n with that of its Gaussian components u(n) and v(n).
Large positive values of a(n) occur when both u(n) and v(n) have relatively few prime factors.
Since |u(n)| and |v(n)| are of order about p^(n/2), probabilistic number theory suggests that Omega(u(n)) and Omega(v(n)) grow roughly like log log |u(n)|, which is about log(n). A refined heuristic suggests a(n) ~ n - 2*log(n) - C_p, where C_p = 2*(log(log(p)) - log(2) + B), with p = u(1)^2 + v(1)^2 and B the Meissel-Mertens constant (A077761). Fluctuations around this trend are of order sqrt(log(n)) and are governed by Erdős-Kac type behavior of Omega. For p = 17 this gives C_p ~ 1.22, explaining the observed vertical offset, see linked graph.
LINKS
Felix Huber, Growth of a(n).
Eric Weisstein's World of Mathematics, Erdős-Kac theorem.
Eric Weisstein's World of Mathematics, Hardy-Ramanujan theorem.
FORMULA
a(n) = n - A001222(|Re((4 + i)^n)|) - A001222(|A106393(n - 1)|).
EXAMPLE
a(2) = -3 since (4 + i)^2 = 15 + 8*i, so Omega(15) = 2, Omega(8) = 3 and hence 2 - 2 - 3 = -3.
a(13) = 7 since (4 + i)^13 = 3455641 + 4839120*i, so Omega(3455641) = 2, Omega(4839120) = 4 and hence 13 - 2 - 4 = 7.
MAPLE
with(NumberTheory):
A396957List := proc(N)
local a, b, k, u, v;
u := 4;
v := 1;
a := Vector(N);
for k from 1 to N do
a[k] := k - Omega(abs(u)) - Omega(abs(v));
b := 4*u - v;
v := u + 4*v;
u := b;
end do;
convert(a, list)
end proc:
A396957List(69);
MATHEMATICA
Table[n - PrimeOmega@ Abs@ Re[#] - PrimeOmega@ Abs@ Im[#] &[(4 + I)^n], {n, 69}] (* Michael De Vlieger, Jun 18 2026 *)
KEYWORD
sign
AUTHOR
Felix Huber, Jun 16 2026
STATUS
approved