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!)
A346707 "Look once to the left" sequence, omitting a(k) for each iteration k, starting with 1,2 (see example). 0
1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The ratio of number of 2's to number of 1's appears to converge to 1.3985918...
LINKS
EXAMPLE
Begin with [1, 2].
Iteration 1: append to self, omitting term 1: [1, 2] + [2] = [1, 2, 2].
Iteration 2: append to self, omitting term 2: [1, 2, 2] + [1, 2] = [1, 2, 2, 1, 2].
Iteration 3: append to self, omitting term 3: [1, 2, 2, 1, 2] + [1, 2, 1, 2] = [1, 2, 2, 1, 2, 1, 2, 1, 2].
MATHEMATICA
Block[{a = {1, 2}}, Do[a = Join[a, Delete[a, i]], {i, 7}]; a] (* Michael De Vlieger, Aug 04 2021 *)
PROG
(Python)
def sequence(iterations, start=[1, 2]):
a = start
for k in range(0, iterations):
a = a + a[:k] + a[k+1:]
return a
(PARI) a(n) = n-=2; while(n>0, my(k=logint(n, 2)); n-=1<<k; if(n<k, n--)); n+2; \\ Kevin Ryde, Aug 03 2021
CROSSREFS
Sequence in context: A026607 A319981 A052005 * A138702 A344339 A348364
KEYWORD
nonn
AUTHOR
Matthew Malone, Jul 29 2021
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 September 14 02:26 EDT 2024. Contains 375910 sequences. (Running on oeis4.)