OFFSET
1,3
COMMENTS
Apparently, each integer (from Z) appears in this sequence.
EXAMPLE
For n = 42:
- 42 = 2 * 3 * 7 = prime(1)^1 * prime(2)^1 * prime(4)^1,
- f(42) = (1+i) * (2+i) * (4+i) = 1 + 13*i,
- and a(42) = 1.
MAPLE
b:= proc(n) option remember; uses numtheory;
mul(pi(i[1])+i[2]*I, i=ifactors(n)[2])
end:
a:= n-> Re(b(n)):
seq(a(n), n=1..78); # Alois P. Heinz, Feb 15 2022
MATHEMATICA
f[p_, e_] := PrimePi[p] + e*I; a[1] = 1; a[n_] := Re[Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Feb 15 2022 *)
PROG
(PARI) a(n) = { my (f=factor(n), p=f[, 1]~, e=f[, 2]~); real(prod (k=1, #p, primepi(p[k]) + I*e[k])) }
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Rémy Sigrist, Feb 11 2022
STATUS
approved