login
a(n) = n - Omega(|Re((4 + i)^n)|) - Omega(|Im((4 + i)^n)|), where Omega is A001222.
5

%I #12 Jun 22 2026 21:33:58

%S -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,

%T 11,23,9,25,12,21,20,25,12,31,24,24,18,35,21,36,23,29,33,42,21,39,31,

%U 34,33,47,31,42,32,44,44,51,27,55,49,45,38,51,40,60,47,54

%N a(n) = n - Omega(|Re((4 + i)^n)|) - Omega(|Im((4 + i)^n)|), where Omega is A001222.

%C 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.

%C 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.

%C 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).

%C Large positive values of a(n) occur when both u(n) and v(n) have relatively few prime factors.

%C 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.

%H Felix Huber, <a href="/A396957/a396957.pdf">Growth of a(n)</a>.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Erdos-KacTheorem.html">Erdős-Kac theorem</a>.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Hardy-RamanujanTheorem.html">Hardy-Ramanujan theorem</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Fermat%27s_theorem_on_sums_of_two_squares">Fermat's theorem on sums of two squares</a>.

%F a(n) = n - A001222(|Re((4 + i)^n)|) - A001222(|A106393(n - 1)|).

%e a(2) = -3 since (4 + i)^2 = 15 + 8*i, so Omega(15) = 2, Omega(8) = 3 and hence 2 - 2 - 3 = -3.

%e a(13) = 7 since (4 + i)^13 = 3455641 + 4839120*i, so Omega(3455641) = 2, Omega(4839120) = 4 and hence 13 - 2 - 4 = 7.

%p with(NumberTheory):

%p A396957List := proc(N)

%p local a, b, k, u, v;

%p u := 4;

%p v := 1;

%p a := Vector(N);

%p for k from 1 to N do

%p a[k] := k - Omega(abs(u)) - Omega(abs(v));

%p b := 4*u - v;

%p v := u + 4*v;

%p u := b;

%p end do;

%p convert(a, list)

%p end proc:

%p A396957List(69);

%t Table[n - PrimeOmega@ Abs@ Re[#] - PrimeOmega@ Abs@ Im[#] &[(4 + I)^n], {n, 69}] (* _Michael De Vlieger_, Jun 18 2026 *)

%Y Cf. A000351, A001222, A002144, A077761, A106393, A396955, A396956, A396958, A396959.

%K sign

%O 1,2

%A _Felix Huber_, Jun 16 2026