

A082691


a(1)=1, a(2)=2, then if 3*2^k1 first terms are a(1),a(2),.........,a(3*2^k  1) we have the 3*2^(k+1)1 first terms as : a(1),a(2),.........,a(3*2^k  1),a(1),a(2),.........,a(3*2^k  1),a(3*2^k1)+1.


1



1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 5, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 5, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 4, 5, 6, 7, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Consider the subsequence b(k) such that a(b(k))=1. Then 3kb(k)=A063787(k+1) and
b(k) = 1+A004134(k1).
A naive way to try and guess whether a sequence is periodic, based on its first k terms (n1,...,nk), is to look at all sequences which have period less than k, and guess "periodic" if any of them extend (n1,...,nk), "nonperiodic" otherwise.
a(1)=1, a(2)=2. Suppose a(1),...,a(n) have been defined, n>1.
1. If the above guessing method guesses that (a(1),...,a(n)) is an initial segment of a periodic sequence, then let a(n+1) be the least nonzero number not appearing in (a(1),...,a(n)).
2. Otherwise, let (a(n+1),...,a(2n)) be a copy of (a(1),...,a(n)).
This sequence thwarts the guessing attempt, tricking the guesser into changing his mind infinitely many times as n>infty. Sam Alexander


LINKS

Table of n, a(n) for n=1..105.
S. Alexander, On Guessing Whether A Sequence Has A Certain Property, preprint.


EXAMPLE

To construct the sequence : start with (1, 2) concatenate those 2 terms gives (1,2,1,2). Add 3, gives the first 5 terms : (1,2,1,2,3). Concatenate those 5 terms gives : (1,2,1,2,3,1,2,1,2,3). Add 4, gives the first 11 terms : (1,2,1,2,3,1,2,1,2,3,4) etc.


CROSSREFS

Cf. A082692 (partial sums), A182659, A182661 (other sequences engineered to spite naive guessers)
Sequence in context: A106036 A007001 A094917 * A183198 A249160 A269970
Adjacent sequences: A082688 A082689 A082690 * A082692 A082693 A082694


KEYWORD

nonn


AUTHOR

Benoit Cloitre, Apr 12 2003


EXTENSIONS

Crossref corrected by William Rex Marshall, Nov 27 2010


STATUS

approved



