Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
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
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 A351555
KEYWORD
base,nonn
AUTHOR
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 August 18 13:06 EDT 2024. Contains 375269 sequences. (Running on oeis4.)