%I #23 Nov 23 2017 16:01:06
%S 1,5,9,13,15,19,23,27,29,33,37,41,43,47,49,53,57,61,63,67,71,75,77,81,
%T 85,89,91,95,97,101,105,109,111,115,119,123,125,129,133,137,139,143,
%U 145,149,153,157,159,163,165,169,173,177,179,183,187,191,193
%N a(1)=1; for n>1, a(n)=a(n-1)+2 if n is already in the sequence, a(n)=a(n-1)+4 otherwise.
%C Also, positions of 0 in A284939; complement of A284941. - R. J. Mathar_, Apr 24 2017
%C Proof that this is the same as the positions of 0 in A284939, from _Joe Slater_, Apr 26 2017: (Start)
%C The sequence A284939 consists of a concatenation of the words 01 and 1101, each word representing a single term from the previous iteration of the transformation taken in order.
%C Because the sequence has reached its fixed point we don't need to compare these words to the terms of the previous iteration: we can actually relate the present iteration to itself.
%C Thus the following table relates terms of A284939 to its words. We would end up with the same sequence by concatenating either the terms or the words:
%C 0 -> 01
%C 1 -> 1101
%C 1 -> 1101
%C 1 -> 1101
%C 0 -> 01
%C 1 -> 1101
%C ... ...
%C Consider any arbitrary term A284939(n) and its successor A284939(n+1) . They relate to the n-th and (n+1)-st words, and since neither of the possible words have sequential zeros there are only three possibilities for the two terms (0,1; 1,0; and 1,1) and therefore three possibilities for the words: 01 1101, 1101 01, or 1101 1101.
%C We can see that the only time there is a gap of three 1's between the first and second zeros will be when the two terms A284939(n) and A284939(n+1) are (1,0). Therefore, if the n-th zero of the sequence (corresponding to the term A284939(n)) is at position k, it will be followed by a zero at position k+2 if the term A284939(n+1)=0, but otherwise it will be followed by a zero at position k+4.
%C Let's relate this to the present sequence A080580:
%C We know sequence A284939 starts with a zero in position 1 (i.e., A284939(1)=0), so we can make a sequence S (say) listing the position of the zeros with S(1)=1. From our earlier discussion we know that the n-th zero of A284939 relates to the n-th term of A284939. Therefore, if S(n)=k, the following term S(n+1) will be +4 if A284939(n+1)=1 and +2 if A284939(n+1)=0.
%C But we don't actually need to refer to A284939 at all! When we come to S(n+1) we can just see whether n+1 appears in our sequence. If the number n+1 already appears in S then we know that A284939(n+1)=0, so S(n+1)=S(n)+2. If the number n+1 does not appear in S then we know that A284939(n+1)=1, so S(n+1)=S(n)+4.
%C This rule is exactly the rule of A080580, which means that A080580 and S are identical, and A080580 manages to predict the positions of the zeros in A284939 without ever referring to the sequence itself. QED
%C (End)
%H Clark Kimberling, <a href="/A080580/b080580.txt">Table of n, a(n) for n = 1..10000</a>
%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Cloitre/cloitre2.html">Numerical analogues of Aronson's sequence</a>, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://arXiv.org/abs/math.NT/0305308">Numerical analogues of Aronson's sequence</a> (math.NT/0305308)
%p A080580 := proc(n)
%p option remember;
%p if n = 1 then
%p 1;
%p else
%p known := false ;
%p for i from 1 to n-1 do
%p if procname(i) = n then
%p known := true;
%p break;
%p end if;
%p end do:
%p if known then
%p procname(n-1)+2 ;
%p else
%p procname(n-1)+4 ;
%p end if;
%p end if;
%p end proc:
%p seq(A080580(n),n=1..100) ; # _R. J. Mathar_, Apr 25 2017
%t a[1] = 1; a[n_] := a[n] = If[MemberQ[Array[a, n-1], n], a[n-1]+2, a[n-1]+4 ];
%t Array[a, 60] (* _Jean-François Alcover_, Nov 23 2017 *)
%Y Cf. A080455-A080458, A080036, A080037.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Mar 23 2003
%E Edited by _N. J. A. Sloane_, Apr 27 2017