A011655 - OEIS (original) (raw)
0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1
COMMENTS
A binary m-sequence: expansion of reciprocal of x^2+x+1 (mod 2).
A Chebyshev transform of the Jacobsthal numbers A001045: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))*A(x/(1+x^2)). - Paul Barry, Feb 16 2004
This is the r = 1 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.
This is the Fibonacci sequence (A000045) modulo 2. - Stephen Jordan (sjordan(AT)mit.edu), Sep 10 2007
This is also the Lucas numbers (A000032) mod 2. In general, this is the parity of any Lucas sequence associated with any pair (P,Q) when P and Q are odd; i.e., a(n) = U_n(P,Q) mod 2 = V_n(P,Q) mod 2. See Ribenboim. - Rick L. Shepherd, Feb 07 2009
Starting with offset 1: (1, 1, 0, 1, 1, 0, ...) = INVERTi transform of the tribonacci sequence A001590 starting (1, 2, 3, 6, 11, 20, 37, ...). - Gary W. Adamson, May 04 2009
Characteristic function of numbers coprime to 3.
A000212(n) = Sum_{k=0..n} a(k)*(n-k). (End)
The sequence is the principal Dirichlet character of the reduced residue system mod 3 (the other is A102283). Associated Dirichlet L-functions are L(2,chi) = Sum_{n>=1} a(n)/n^2 = 4*Pi^2/27 = A214549, and L(3,chi) = Sum_{n>=1} a(n)/n^3 = 1.157536... = -(psi''(1/3) + psi''(2/3))/54 where psi'' is the tetragamma function. [Jolley eq 309 and arXiv:1008.2547, L(m = 3, r = 1, s)]. - R. J. Mathar, Jul 15 2010
a(n+1), n >= 0, is the sequence of the row sums of the Riordan triangle A158454. - Wolfdieter Lang, Dec 18 2010
Removing the first two elements and keeping the offset at 0, this is a periodic sequence (1, 0, 1, 1, 0, 1, ...). Its INVERTi transform is (1, -1, 2, -2, 2, -2, ...) with period (2,-2). - Gary W. Adamson, Jan 21 2011
The set of natural numbers, A000027: (1, 2, 3, ...); is the INVERT transform of the signed periodic sequence (1, 1, 0, -1, -1, 0, 1, 1, 0, ...). - Gary W. Adamson, Apr 28 2013
Any integer sequence s(n) = |s(n-1) - s(n-2)| (equivalently, max(s(n-1), s(n-2)) - min(s(n-1), s(n-2))) for n > i + 1 with s(i) = j and s(i+1) = k, where j and k are not both 0, is or eventually becomes a multiple of this sequence, namely, the sequence repeat gcd(j, k), gcd(j, k), 0 (at some offset). In particular, if j and k are coprime, then s(n) is or eventually becomes this sequence (see, e.g., A110044). - Rick L. Shepherd, Jan 21 2014
For n >= 1, a(n) is also the characteristic function for rational g-adic integers (+n/3)_g and also (-n/3)_g for all integers g >= 2 without a factor 3 (A001651). See the definition in the Mahler reference, p. 7 and also p. 10. - Wolfdieter Lang, Jul 11 2014
Characteristic function for A007908(n+1) being divisible by 3. a(n) = bit flipped A007908(n+1) (mod 3) = bit flipped A079978(n). - Wolfdieter Lang, Jun 12 2017
Also Jacobi or Kronecker symbol (n/9) (or (n/9^e) for all e >= 1). - Jianing Song, Jul 09 2018
The binomial trans. is 0, 1, 3, 6, 11, 21, 42, 85, 171, 342,.. (see A024495). - R. J. Mathar, Feb 25 2023
REFERENCES
S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967.
H. D. Lueke, Korrelationssignale, Springer 1992, pp. 43-48.
F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, p. 408.
K. Mahler, p-adic numbers and their functions, 2nd ed., Cambridge University press, 1981.
P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, NY, 1991, p. 46. [Rick L. Shepherd, Feb 07 2009]
FORMULA
G.f.: (x + x^2) / (1 - x^3) = Sum_{k>0} (x^k - x^(3*k)).
G.f.: x / (1 - x / (1 + x / (1 + x / (1 - 2*x / (1 + x))))). - Michael Somos, Apr 02 2012
a(n) = a(n+3) = a(-n), a(3*n) = 0, a(3*n + 1) = a(3*n + 2) = 1 for all n in Z.
a(n) = (1/2)*( (-1)^(floor((2n + 4)/3)) + 1 ). - Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003
a(n) = Fibonacci(n) mod 2. - Paul Barry, Nov 12 2003
a(n) = (2/3)*(1 - cos(2*Pi*n/3)). - Ralf Stephan, Jan 06 2004
a(n) = 1 - a(n-1)*a(n-2), a(n) = n for n < 2. - Reinhard Zumkeller, Feb 28 2004
a(n) = 2*(1 - T(n, -1/2))/3 with Chebyshev's polynomials T(n, x) of the first kind; see A053120. - Wolfdieter Lang, Oct 18 2004
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)*A001045(n-2k)/(n-k). - Paul Barry, Oct 31 2004
From Bruce Corrigan (scentman(AT)myfamily.com), Aug 08 2005: (Start)
a(n) = n^2 mod 3.
a(n) = (1/3)*(2 - (r^n + r^(2*n))) where r = (-1 + sqrt(-3))/2.
(End)
Euler transform of length 3 sequence [ 1, -1, 1].
Moebius transform is length 3 sequence [ 1, 0, -1].
Multiplicative with a(3^e) = 0^e, a(p^e) = 1 otherwise. (End)
a(n) = (4/3)*(|sin(Pi*(n-2)/3)| + |sin(Pi*(n-1)/3)|)*|sin(Pi*n/3)|. - Hieronymus Fischer, Jun 27 2007
a(n) = ((n+1) mod 3 + 1) mod 2 = (1 - (-1)^(n - 3*floor((n+1)/3)))/2. - Hieronymus Fischer, Jun 27 2007
a(2*n+1) = a(n+1) XOR a(n), a(2*n) = a(n), a(1) = 1, a(0) = 0. - Reinhard Zumkeller, Dec 27 2008
Sum_{n>=1} a(n)/n^s = (1-1/3^s)*Riemann_zeta(s), s > 1. - R. J. Mathar, Jul 31 2010
a(n) = floor((4*n-5)/3) mod 2. - Gary Detlefs, May 15 2011
a(n) = (a(n-1) - a(n-2))^2 with a(0) = 0, a(1) = 1. - Francesco Daddi, Aug 02 2011
G.f.: x/(G(0)) - x^2) where G(k) = 1 - x/(x + 1/(1 - x/G(k+1))); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 15 2013
For the general case: The characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, with m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = (2/3) * (1 - sin((Pi/6) * (4*n + 3))) for n >= 0. - Werner Schulte, Jul 20 2017
a(n) = a(n-1) XOR a(n-2) with a(0) = 0, a(1) = 1. - Chunqing Liu, Dec 18 2022
EXAMPLE
G.f. = x + x^2 + x^4 + x^5 + x^7 + x^8 + x^10 + x^11 + x^13 + x^14 + x^16 + x^17 + ...
MATHEMATICA
Mod[Fibonacci[Range[0, 99]], 2] (* Alonso del Arte, Jul 20 2017 *)
PROG
(PARI) {a(n) = sign(n%3)};
(Haskell)
a011655 = fromEnum . ((/= 0) . (`mod` 3))
(Magma) [(n^2 mod 3) : n in [0..100]]; // Wesley Ivan Hurt, Apr 16 2015
(Python)
CROSSREFS
Cf. A000035, A011558, A097325, A109720, A145568, A166486, A168181, A168182, A168184, A168185. - Reinhard Zumkeller, Nov 30 2009