cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A346707 "Look once to the left" sequence, omitting a(k) for each iteration k, starting with 1,2 (see example).

This page as a plain text file.
%I A346707 #24 Aug 21 2021 00:15:59
%S A346707 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,
%T A346707 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,
%U A346707 1,2,1,1,2,1,2,2,2,1,2,1,2,1,2,2,1,1,2
%N A346707 "Look once to the left" sequence, omitting a(k) for each iteration k, starting with 1,2 (see example).
%C A346707 The ratio of number of 2's to number of 1's appears to converge to 1.3985918...
%e A346707 Begin with [1, 2].
%e A346707 Iteration 1: append to self, omitting term 1: [1, 2] + [2] = [1, 2, 2].
%e A346707 Iteration 2: append to self, omitting term 2: [1, 2, 2] + [1, 2] = [1, 2, 2, 1, 2].
%e A346707 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].
%t A346707 Block[{a = {1, 2}}, Do[a = Join[a, Delete[a, i]], {i, 7}]; a] (* _Michael De Vlieger_, Aug 04 2021 *)
%o A346707 (Python)
%o A346707 def sequence(iterations, start=[1,2]):
%o A346707   a = start
%o A346707   for k in range(0, iterations):
%o A346707     a = a + a[:k] + a[k+1:]
%o A346707   return a
%o A346707 (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
%Y A346707 Cf. A000051, A293838.
%K A346707 nonn
%O A346707 1,2
%A A346707 _Matthew Malone_, Jul 29 2021