login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A011655 Period 3: repeat [0, 1, 1]. 138

%I #233 Apr 17 2024 11:17:01

%S 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,

%T 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,

%U 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

%N Period 3: repeat [0, 1, 1].

%C A binary m-sequence: expansion of reciprocal of x^2+x+1 (mod 2).

%C 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

%C This is the r = 1 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.

%C This is the Fibonacci sequence (A000045) modulo 2. - Stephen Jordan (sjordan(AT)mit.edu), Sep 10 2007

%C For n > 0: a(n) = A084937(n-1) mod 2. - _Reinhard Zumkeller_, Dec 16 2007

%C 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

%C 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

%C From _Reinhard Zumkeller_, Nov 30 2009: (Start)

%C Characteristic function of numbers coprime to 3.

%C a(n) = 1 - A079978(n); a(A001651(n)) = 1; a(A008585(n)) = 0;

%C A000212(n) = Sum_{k=0..n} a(k)*(n-k). (End)

%C Sum_{k>0} a(k)/k/2^k = log(7)/3. - _Jaume Oliver Lafont_, Jun 01 2010

%C 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

%C a(n+1), n >= 0, is the sequence of the row sums of the Riordan triangle A158454. - _Wolfdieter Lang_, Dec 18 2010

%C 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

%C Column k = 1 of triangle in A198295. - _Philippe Deléham_, Jan 31 2012

%C 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

%C 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

%C 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

%C 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

%C Also Jacobi or Kronecker symbol (n/9) (or (n/9^e) for all e >= 1). - _Jianing Song_, Jul 09 2018

%C The binomial trans. is 0, 1, 3, 6, 11, 21, 42, 85, 171, 342,.. (see A024495). - _R. J. Mathar_, Feb 25 2023

%D S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967.

%D H. D. Lueke, Korrelationssignale, Springer 1992, pp. 43-48.

%D F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, p. 408.

%D K. Mahler, p-adic numbers and their functions, 2nd ed., Cambridge University press, 1981.

%D P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, NY, 1991, p. 46. [_Rick L. Shepherd_, Feb 07 2009]

%H Andrei Asinowski, Cyril Banderier and Valerie Roitner, <a href="https://lipn.univ-paris13.fr/~banderier/Papers/several_patterns.pdf">Generating functions for lattice paths with several forbidden patterns</a>, (2019).

%H Marcia Edson, Scott Lewis and Omer Yayenie, <a href="http://www.emis.de/journals/INTEGERS/papers/l32/l32.Abstract.html">The k-periodic Fibonacci sequence and an extended Binet's formula</a>, INTEGERS 11 (2011) #A32.

%H Alex Fink, Richard K. Guy, and Mark Krusemeyer, <a href="https://doi.org/10.11575/cdm.v3i2.61940">Partitions with parts occurring at most thrice</a>, Contributions to Discrete Mathematics, Vol 3, No 2 (2008), pp. 76-114. See Section 13.

%H L. B. W. Jolley, <a href="https://archive.org/details/summationofserie00joll">Summation of Series</a>, Dover, (1961)

%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials.</a>

%F G.f.: (x + x^2) / (1 - x^3) = Sum_{k>0} (x^k - x^(3*k)).

%F G.f.: x / (1 - x / (1 + x / (1 + x / (1 - 2*x / (1 + x))))). - _Michael Somos_, Apr 02 2012

%F 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.

%F a(n) = (1/2)*( (-1)^(floor((2n + 4)/3)) + 1 ). - Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003

%F a(n) = Fibonacci(n) mod 2. - _Paul Barry_, Nov 12 2003

%F a(n) = (2/3)*(1 - cos(2*Pi*n/3)). - _Ralf Stephan_, Jan 06 2004

%F a(n) = 1 - a(n-1)*a(n-2), a(n) = n for n < 2. - _Reinhard Zumkeller_, Feb 28 2004

%F 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

%F 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

%F a(n) = A002487(n) mod 2. - _Paul Barry_, Jan 14 2005

%F From Bruce Corrigan (scentman(AT)myfamily.com), Aug 08 2005: (Start)

%F a(n) = n^2 mod 3.

%F a(n) = (1/3)*(2 - (r^n + r^(2*n))) where r = (-1 + sqrt(-3))/2.

%F (End)

%F From _Michael Somos_, Sep 23 2005: (Start)

%F Euler transform of length 3 sequence [ 1, -1, 1].

%F Moebius transform is length 3 sequence [ 1, 0, -1].

%F Multiplicative with a(3^e) = 0^e, a(p^e) = 1 otherwise. (End)

%F a(n) = (4/3)*(|sin(Pi*(n-2)/3)| + |sin(Pi*(n-1)/3)|)*|sin(Pi*n/3)|. - _Hieronymus Fischer_, Jun 27 2007

%F a(n) = ((n+1) mod 3 + 1) mod 2 = (1 - (-1)^(n - 3*floor((n+1)/3)))/2. - _Hieronymus Fischer_, Jun 27 2007

%F a(n) = 2 - a(n-1) - a(n-2) for n > 1. - _Reinhard Zumkeller_, Apr 13 2008

%F 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

%F Sum_{n>=1} a(n)/n^s = (1-1/3^s)*Riemann_zeta(s), s > 1. - _R. J. Mathar_, Jul 31 2010

%F a(n) = floor((4*n-5)/3) mod 2. - _Gary Detlefs_, May 15 2011

%F a(n) = (a(n-1) - a(n-2))^2 with a(0) = 0, a(1) = 1. - _Francesco Daddi_, Aug 02 2011

%F Convolution of A040000 with A049347. - _R. J. Mathar_, Jul 21 2012

%F G.f.: Sum_{k>0} x^A001651(k). - _L. Edson Jeffery_, Dec 05 2012

%F 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

%F 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

%F a(n) = sign(n mod 3). - _Wesley Ivan Hurt_, Jun 22 2013

%F a(n) = A000035(A000032(n)) = A000035(A000045(n)). - _Omar E. Pol_, Oct 28 2013

%F a(n) = (-n mod 3)^((n-1) mod 3). - _Wesley Ivan Hurt_, Apr 16 2015

%F a(n) = (2/3) * (1 - sin((Pi/6) * (4*n + 3))) for n >= 0. - _Werner Schulte_, Jul 20 2017

%F a(n) = a(n-1) XOR a(n-2) with a(0) = 0, a(1) = 1. - _Chunqing Liu_, Dec 18 2022

%e 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 + ...

%p A011655:=n->(n^2 mod 3): seq(A011655(n), n=0..100); # _Wesley Ivan Hurt_, Apr 16 2015

%t A011655[n_] := If[Mod[n, 3] == 0, 0, 1]; Array[A011655, 105, 0] (* _Robert G. Wilson v_ *)

%t Mod[Fibonacci[Range[0, 99]], 2] (* _Alonso del Arte_, Jul 20 2017 *)

%o (PARI) {a(n) = sign(n%3)};

%o (PARI) a(n)=!!(n%3) \\ _Jaume Oliver Lafont_, Mar 24 2009

%o (PARI) a(n)=n%3>0 \\ _M. F. Hasler_, Feb 17 2018

%o (Haskell)

%o a011655 = fromEnum . ((/= 0) . (`mod` 3))

%o a011655_list = cycle [0,1,1] -- _Reinhard Zumkeller_, Apr 07 2012

%o (Magma) [(n^2 mod 3) : n in [0..100]]; // _Wesley Ivan Hurt_, Apr 16 2015

%o (Python)

%o def A011655(n): return int(bool(n%3)) # _Chai Wah Wu_, May 25 2022

%Y Partial sums of A057078 give A011655(n+1).

%Y Cf. A035191 (Mobius transform), A001590, A002487, A049347.

%Y Cf. A000035, A011558, A097325, A109720, A145568, A166486, A168181, A168182, A168184, A168185. - _Reinhard Zumkeller_, Nov 30 2009

%Y Cf. A000027, A000045, A004523 (partial sums), A057078 (first differences).

%Y Cf. A007908, A079978 (bit flipped).

%Y Cf. A011656 - A011751 for other binary m-sequences.

%K nonn,mult,easy

%O 0,1

%A _N. J. A. Sloane_

%E Better name from _Omar E. Pol_, Oct 28 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 03:45 EDT 2024. Contains 372178 sequences. (Running on oeis4.)