login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A332413
a(n) is the imaginary part of f(n) = Sum_{d_k > 0} 3^k * i^(d_k-1) where Sum_{k >= 0} 5^k * d_k is the base 5 representation of n and i denotes the imaginary unit. Sequence A332412 gives real parts.
2
0, 0, 1, 0, -1, 0, 0, 1, 0, -1, 3, 3, 4, 3, 2, 0, 0, 1, 0, -1, -3, -3, -2, -3, -4, 0, 0, 1, 0, -1, 0, 0, 1, 0, -1, 3, 3, 4, 3, 2, 0, 0, 1, 0, -1, -3, -3, -2, -3, -4, 9, 9, 10, 9, 8, 9, 9, 10, 9, 8, 12, 12, 13, 12, 11, 9, 9, 10, 9, 8, 6, 6, 7, 6, 5, 0, 0, 1, 0
OFFSET
0,11
LINKS
FORMULA
a(n) = 0 iff the n-th row of A031219 has neither 2's nor 4's.
a(5*n) = 3*a(n).
a(5*n+1) = 3*a(n).
a(5*n+2) = 3*a(n) + 1.
a(5*n+3) = 3*a(n).
a(5*n+4) = 3*a(n) - 1.
EXAMPLE
For n = 103:
- 103 = 4*5^2 + 3*5^0,
- so f(123) = 3^2 * i^(4-1) + 3^0 * i^(3-1) = -1 - 9*i,
- and a(n) = -9.
PROG
(PARI) a(n) = { my (d=Vecrev(digits(n, 5))); imag(sum (k=1, #d, if (d[k], 3^(k-1)*I^(d[k]-1), 0))) }
CROSSREFS
Cf. A031219, A289814, A332412 (real parts and additional comments).
Sequence in context: A082924 A159636 A023647 * A239207 A329157 A082978
KEYWORD
sign,base
AUTHOR
Rémy Sigrist, Feb 12 2020
STATUS
approved