login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A188967 Zero-one sequence based on (3n-2): a(A016777(k))=a(k); a(A007494(k))=1-a(k); a(1)=0. 45
0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

Compare with the generation of the Thue-Morse sequence T=A010060 from T(2n-1)=T(n), T(2n)=1-T(n), T(1)=0.

Other zero-one sequences generated in this manner:

from triangular numbers: A189011

from squares: A188973

from pentagonal numbers: A189014

from hexagonal numbers: A189212

from Beatty [n*sqrt(2)]: A189078 and A189081

from cubes: A189008

from primes: A189141

from (3n): A18215 and A189222

from (3n-1): A189097

from (3n-2): A188967

from (4n): A189289, A189292, A189275, A189298

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

Let u=A016777 and v=A007494, so that u(n)=3n-2 and v=complement(u) for n>=1.  Then a is a self-generating zero-one sequence with initial value a(1)=0 and a(u(k))=a(k); a(v(k))=1-a(k).

a(2)=a(v(1))=1-a(1)=1

a(3)=a(v(2))=1-a(2)=0

a(4)=a(u(2))=a(2)=1.

MATHEMATICA

u[n_] := 3n - 2;  (*A016777*)

a[1] = 0; h = 128;

c = (u[#1] &) /@ Range[h];

d = (Complement[Range[Max[#1]], #1] &)[c]; (*A007494*)

Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}];

Table[a[c[[n]]] = a[n], {n, 1, h}]   (*A188967*)

Flatten[Position[%, 0]]  (*A188968*)

Flatten[Position[%%, 1]] (*A188969*)

PROG

(Haskell)

import Data.List (transpose)

a188967 n = a188967_list !! (n-1)

a188967_list = 0 : zipWith ($)

                   (cycle [(1 -) . a188967, (1 -) . a188967, a188967])

                   (concat $ transpose [[1, 3 ..], [2, 4 ..], [2 ..]])

-- Reinhard Zumkeller, May 18 2015

CROSSREFS

Cf. A188968, A188969.

Cf. A257998 (partial sums), A258062 (run lengths).

Sequence in context: A189031 A189212 A191156 * A188973 A188970 A244992

Adjacent sequences:  A188964 A188965 A188966 * A188968 A188969 A188970

KEYWORD

nonn

AUTHOR

Clark Kimberling, Apr 14 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified April 25 00:46 EDT 2017. Contains 285346 sequences.