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.

A306346 Start with the sequence S(1) = [0], and for n >= 1 define S(n+1) to equal the concatenation of S(n) with the RUNS transform of S(n) when read in reverse order. This sequence is the limit of that process as n goes to infinity.

This page as a plain text file.
%I A306346 #34 Mar 06 2025 11:10:06
%S A306346 0,1,1,1,3,1,1,1,3,1,1,1,3,1,3,1,1,1,1,1,3,1,3,1,3,1,1,1,1,1,1,1,5,1,
%T A306346 1,1,3,1,3,1,3,1,1,1,1,1,1,1,3,1,7,1,1,1,1,1,5,1,1,1,3,1,3,1,3,1,1,1,
%U A306346 1,1,1,1,3,1,5,1,1,1,7,1,1,1,1,1,3,1,7,1
%N A306346 Start with the sequence S(1) = [0], and for n >= 1 define S(n+1) to equal the concatenation of S(n) with the RUNS transform of S(n) when read in reverse order. This sequence is the limit of that process as n goes to infinity.
%C A306346 Conjecture 1: a(n) <= 7.
%C A306346 Conjecture 2: a(n) is odd for n > 1 and when a(n) = 3, 5 or 7, n is odd.
%C A306346 Property of the sequence:
%C A306346 a(n) = 3 for the odd values n = 5, 9, 13, 15, 21, 23, 25, 37, 39, ...
%C A306346 a(n) = 5 for the odd values n = 33, 57, 75, 93, 111, 115, 129, 147, ...
%C A306346 a(n) = 7 for the odd values n = 51, 79, 87, 121, 133, 141, 185, 203, ...
%C A306346 Remark:
%C A306346 If row 1 = [1], the sequence a(n) becomes b(n) = 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 3, 1, 1, 1, ... and it is conjectured that b(n) <= 7.
%C A306346 Statistics for n <= 10^5:
%C A306346 +--------------+-------------------------+------------+
%C A306346 |    a(n)      |  number of occurrences  | percentage |
%C A306346 |              |      for n <= 10^5      |            |
%C A306346 +--------------+-------------------------+------------+
%C A306346 |      1       |          72244          |   72.244%  |
%C A306346 |      3       |          18030          |   18.030%  |
%C A306346 |      5       |           6806          |    6.806%  |
%C A306346 |      7       |           2919          |    2.919%  |
%C A306346 +--------------+-------------------------+------------+
%e A306346 We may consider this sequence to be the limit of the rows of the irregular triangle in which row n+1 equals the concatenation of row n with the RUNS transform of row n when read in reverse order, as illustrated below.
%e A306346 Start with row 1 = [0];
%e A306346 the RUNS of row 1 in reverse = [1], so row 2 = row 1 + [1] = [0, 1];
%e A306346 the RUNS of row 2 in reverse = [1, 1], so row 3 = row 2 + [1, 1] = [0, 1, 1, 1];
%e A306346 the RUNS of row 3 in reverse = [3, 1], so row 4 = row 3 + [3, 1] = [0, 1, 1, 1, 3, 1];
%e A306346 the RUNS of row 4 in reverse = [1, 1, 3, 1], so row 5 = row 4 + [1, 1, 3, 1] = [0, 1, 1, 1, 3, 1, 1, 1, 3, 1];
%e A306346 etc.
%e A306346 The irregular triangle starts:
%e A306346   [0];
%e A306346   [0, 1];
%e A306346   [0, 1, 1, 1];
%e A306346   [0, 1, 1, 1, 3, 1];
%e A306346   [0, 1, 1, 1, 3, 1, 1, 1, 3, 1];
%e A306346   [0, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1];
%e A306346   [0, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1];
%e A306346   ...
%e A306346 in which the limit of the rows yields this sequence.
%e A306346 The row lengths of the above triangle equal A381357 (offset 3).
%p A306346 n0:=1:T:=array(1..1000,[0$1000]):
%p A306346 for n from 1 to 50 do :
%p A306346   it:=1:i:=n0:
%p A306346   for k from n0 by -1 to 2 do:
%p A306346     if T[k]=T[k-1]
%p A306346      then
%p A306346      it:=it+1:
%p A306346      else
%p A306346      i:=i+1:T[i]:=it:it:=1:
%p A306346     fi:
%p A306346    od:
%p A306346   i:=i+1:T[i]:=1:n0:=i:
%p A306346   od:
%p A306346 print(T):
%o A306346 (PARI) \\ From _Paul D. Hanna_, Mar 04 2025: (Start)
%o A306346 \\ Print the first N rows of the irregular triangle.
%o A306346 \\ This sequence equals the limit of the rows.
%o A306346 \\ RUNS(V) Returns vector of run lengths in vector V:
%o A306346 {RUNS(V) = my(R=[], c=1); if(#V>1, for(n=2, #V, if(V[n]==V[n-1], c=c+1, R=concat(R, c); c=1))); R=concat(R, c)}
%o A306346 \\ REV(V) Reverses order of vector V:
%o A306346 {REV(V) = Vec(Polrev(Ser(V)))}
%o A306346 \\ Generates N rows as a vector A of row vectors
%o A306346 {N=12; A=vector(N); A[1]=[0];
%o A306346 for(n=1, #A-1, A[n+1] = concat(A[n], RUNS(REV(A[n]))); );}
%o A306346 for(n=1,N,print(A[n])) \\ (End)
%Y A306346 Cf. A000002, A381587, A381356, A381357.
%K A306346 nonn
%O A306346 1,5
%A A306346 _Michel Lagneau_, Feb 09 2019
%E A306346 Name corrected and edited by _Paul D. Hanna_, Mar 05 2025