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”).

A343785
a(n) is completely multiplicative with a(p^e) = (-1)^e if p == 2 (mod 3) and a(p^e) = 1 otherwise.
6
1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1
OFFSET
1
LINKS
Peter Borwein and Michael Coons, Transcendence of the Gaussian Liouville number and relatives, arXiv:0806.1694 [math.NT], 2008.
Michael J. Coons, Some aspects of analytic number theory: parity, transcendence, and multiplicative functions, Ph.D. Thesis, Department of Mathematics, Simon Fraser University, 2009.
Chandler Davis and Donald E. Knuth, Number Representations and Dragon Curves -- I and II, Journal of Recreational Mathematics, volume 3, number 2, April 1970, pages 66-81, and number 3, July 1970, pages 133-149. Reprinted in Donald E. Knuth, Selected Papers on Fun and Games, 2011, pages 571-614. a(n) = d(n) at equation 5.2 and multiplicative at equation 6.3.
Chandler Davis and Donald E. Knuth, Number Representations and Dragon Curves, Journal of Recreational Mathematics, volume 3, number 2, April 1970, pages 66-81, and number 3, July 1970, pages 133-149. [Cached copy, with permission]
Kevin Ryde, Iterations of the Terdragon Curve, see index "turn".
Terence Tao, The Erdős discrepancy problem, arXiv:1509.05363 [math.CO], 2016; see Example 1.4.
FORMULA
a(3*n) = a(n), a(3*n+1) = 1 and a(3*n+2) = -1.
G.f.: Sum_{k>=0} x^(3^k) / (1 + x^(3^k) + x^(2*3^k)).
Sum_{k>=1} a(k)/2^k = A343786.
From Peter Munn, Jun 10 2021: (Start)
a(n) = 1 if n is in A182828, otherwise a(n) = -1.
a(n) = A008836(A343430(n)). (End)
MATHEMATICA
f[p_, e_] := If[Mod[p, 3] == 2, (-1)^e, 1]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = my(r); until(r, [n, r]=divrem(n, 3)); -(-1)^r; \\ Kevin Ryde, Nov 09 2021
(Python)
from functools import reduce
from operator import ixor
from sympy import factorint
def A343785(n): return -1 if reduce(ixor, (e&1 if p%3==2 else 0 for p, e in factorint(n).items()), 0) else 1 # Chai Wah Wu, Dec 23 2022
CROSSREFS
A008836 composed with A343430.
Cf. A060236 (as 1,2), A080846 (as 0,1), A137893 (as 1,0).
Cf. A026179 (indices of -1's except n=1), A062756 (partial sums).
Sequence in context: A256175 A319116 A337004 * A359738 A360710 A269529
KEYWORD
sign,mult,easy,changed
AUTHOR
Amiram Eldar, Apr 29 2021
STATUS
approved