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

%I #10 Jun 22 2026 21:32:51

%S -1,-3,-1,-3,0,-4,2,-3,3,-1,5,-2,6,3,6,0,12,2,11,4,9,9,18,3,14,12,16,

%T 13,19,9,24,10,20,24,23,12,31,23,25,16,33,19,35,24,29,34,40,17,39,28,

%U 38,31,47,27,39,30,44,42,55,29,53,46,43,38,48,38,61,50,55

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

%C Let u(n) + i*v(n) = (5 + 2*i)^n, so that u(n)^2 + v(n)^2 = 29^n, where 29 == 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) = 5*u(n) - 2*v(n), v(n + 1) = 2*u(n) + 5*v(n), with u(1) = 5 and v(1) = 2.

%C Since u(n)^2 + v(n)^2 = 29^n and gcd(u(n), v(n)) = 1 (any common divisor must divide 29^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 29^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 = 29 this gives C_p ~ 1.56, explaining the stronger downward shift, see linked graph.

%H Felix Huber, <a href="/A396958/a396958.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((5 + 2*i)^n)|) - A001222(|Im((5 + 2*i)^n)|).

%e a(2) = -3 since (5 + 2*i)^2 = 21 + 20*i, so Omega(21) = 2, Omega(20) = 3 and hence 2 - 2 - 3 = -3.

%e a(11) = 5 since (5 + 2*i)^11 = -55535695 - 95479298*i, so Omega(55535695) = 4, Omega(95479298) = 2 and hence 11 - 4 - 2 = 5.

%p with(NumberTheory):

%p A396958List := proc(N)

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

%p u := 5;

%p v := 2;

%p a := Vector(N);

%p for k from 1 to N do

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

%p b := 5*u - 2*v;

%p v := 2*u + 5*v;

%p u := b;

%p end do;

%p convert(a, list)

%p end proc:

%p A396958List(69);

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

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

%K sign

%O 1,2

%A _Felix Huber_, Jun 17 2026