A289311 Let f be the multiplicative function satisfying f(p^k) = (1 + p*I)^k for any prime p and k > 0 (where I^2 = -1); a(n) = the imaginary part of f(n).
0, 2, 3, 4, 5, 5, 7, -2, 6, 7, 11, -5, 13, 9, 8, -24, 17, -10, 19, -11, 10, 13, 23, -35, 10, 15, -18, -17, 29, -20, 31, -38, 14, 19, 12, -50, 37, 21, 16, -57, 41, -30, 43, -29, -34, 25, 47, -45, 14, -38, 20, -35, 53, -70, 16, -79, 22, 31, 59, -80, 61, 33, -50
Offset: 1
Keywords
Examples
f(12) = f(2^2 * 3) = (1 + 2*I)^2 * (1 + 3*I) = -15 - 5*I, hence a(12) = -5.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Array[Im[Times @@ Map[(1 + #1 I)^#2 & @@ # &, FactorInteger@ #]] - Boole[# == 1] &, 63] (* Michael De Vlieger, Jul 03 2017 *)
-
PARI
a(n) = my (f=factor(n)); imag (prod(i=1, #f~, (1 + f[i,1]*I) ^ f[i,2]))
Comments