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.

A098280 Front-to-back insertion-permutation sequence.

This page as a plain text file.
%I A098280 #7 Sep 01 2021 03:08:55
%S A098280 1,2,1,1,2,3,2,1,2,3,1,2,1,3,3,1,2,1,3,2,1,2,3,4,3,2,1,3,4,2,1,3,2,4,
%T A098280 1,3,2,1,4,4,2,3,1,2,4,3,1,2,3,4,1,2,3,1,4,4,2,1,3,2,4,1,3,2,1,4,3,2,
%U A098280 1,3,4,4,3,1,2,3,4,1,2,3,1,4,2,3,1,2,4,4,1,3,2,1,4,3,2,1,3,4,2,1,3,2,4,4,1,2,3,1,4,2,3,1,2,4,3,1,2,3,4
%N A098280 Front-to-back insertion-permutation sequence.
%C A098280 Contains every finite sequence of distinct numbers infinitely many times.
%F A098280 Write 1. Then place 2 before 1 and then 2 after 1, yielding 21 and 12, as well as the first 5 terms of the sequence. Next, generate the 6 permutations of 1, 2, 3 by inserting 3 into 21 and then 12, from front-to-back, like this: 321, 231, 213 then 213, 132, 123. Next, generate the 24 permutations of 1, 2, 3, 4 by inserting 4 into the permutations of 1, 2, 3. Continue forever.
%e A098280 The permutations can be written as
%e A098280 1,
%e A098280 21, 12,
%e A098280 321, 231, 213, 312, 132, 123, etc.
%e A098280 Write them in order and insert commas.
%o A098280 (PARI) tabf(nn) = my(v=[[1]], w); print(v); for(n=2, nn, w=List([]); for(k=1, #v, for(i=1, n, listput(w, concat([v[k][1..i-1], n, v[k][i..n-1]])))); print(Vec(v=w))); \\ _Jinyuan Wang_, Sep 01 2021
%Y A098280 Cf. A030298, A098281.
%K A098280 nonn
%O A098280 1,2
%A A098280 _Clark Kimberling_, Sep 01 2004