The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A330005 a(n) counts the square-words immediately before a(n), with a(1) = 0. 2
 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 2, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 3, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 2, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 3, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 3, 1, 1, 1, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,8 COMMENTS Conjecture: Every integer will appear in the sequence. (Although very slowly: after 10000 terms, the biggest term is 5.) Only the square-words are counted, not the cubes or the higher powers. The segment 1,1,1 will thus be followed by 0, and the same 0 will follow the segment 0,1,0,1,0,1,0,1 (because the pattern 0,1 is present four times instead of the required two, and because we don't accept splitting 0,1,0,1,0,1,0,1 in order to form two 0,1,0,1 substrings). Overlaps are admitted: a typical case is the start with a(1) = 1. This produces 1,0,0,1,0,0,2,... with a(7) = 2 because there are indeed two squares immediately to the left of a(7): the square {0,0} and the square {100,100}. LINKS Jean-Marc Falcoz, Table of n, a(n) for n = 1..10001 EXAMPLE S = 0, ... We start with a(1) = 0 as this 0 means: "I don't see any square on my immediate left"; S = 0,0, ... We extend S with a(2) = 0 as this 0 says the same as above: "I don't see any square on my immediate left". Note that no other integer would fit without contradiction [a(2) = 1, for instance, would say that there is one square on the immediate left of "1", which is not the case - a lonely symbol cannot form a square]. S = 0,0,1, ... As we now see the square {00}, S is extended with a(3) = 1 S = 0,0,1,0, ... No square in sight, we thus extend S with a(4) = 0 [the word "immediate" is important: "There is no square on the immediate left of a(4) = 0"]; S = 0,0,1,0,0, ... No visible square again, so a(5) = 0; S = 0,0,1,0,0,1, ... We see here that a(6) must be 1, as this "1" is immediately after the square {00} S = 0,0,1,0,0,1,1, ... Yes: a(7) = 1 because a(7) sees 1 square on its immediate left, which is formed by {001,001}; S = 0,0,1,0,0,1,1,2, ... We see a third symbol entering S, the integer "2"; the reason is that 2 sees two squares on its immediate left, the first one being {11} and the second one {00} (again, the remote square {00} that opens S is not "immediately" to the left of 2, so we don't count it); etc. PROG (PARI) A330005_upto(N, A=0)={for(n=2, #A=Vec(A, N), A[n]=sum(L=1, (n-1)\2, if(A[n-L..n-1]==A[n-L*2..n-L-1] &&(L*3>=n || A[n-L..n-1]!=A[n-L*3..n-L*2-1]), A[n-L*2+1]+1))); A} \\ Optional arg A specifies starting value. - M. F. Hasler, Nov 28 2019 CROSSREFS Cf. A090822, A091970, A329447. The sequence A330023 does the same with cubes. Sequence in context: A330168 A081603 A273513 * A165277 A245194 A215020 Adjacent sequences:  A330002 A330003 A330004 * A330006 A330007 A330008 KEYWORD base,nonn AUTHOR Eric Angelini and Jean-Marc Falcoz, Nov 26 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 11 18:00 EDT 2021. Contains 342888 sequences. (Running on oeis4.)