The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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): A189215 and A189222
from (3n-1): A189097
from (3n-2): A188967
LINKS
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. A257998 (partial sums), A258062 (run lengths).
Sequence in context: A341684 A327183 A347870 * A090171 A316832 A086747
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 16:21 EDT 2024. Contains 372533 sequences. (Running on oeis4.)