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.
%I A080580 #33 Jul 29 2025 16:15:15 %S A080580 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 A080580 85,89,91,95,97,101,105,109,111,115,119,123,125,129,133,137,139,143, %U A080580 145,149,153,157,159,163,165,169,173,177,179,183,187,191,193 %N A080580 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 A080580 Also, positions of 0 in A284939; complement of A284941. - R. J. Mathar_, Apr 24 2017 %C A080580 Proof that this is the same as the positions of 0 in A284939, from _Joe Slater_, Apr 26 2017: (Start) %C A080580 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 A080580 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 A080580 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 A080580 0 -> 01 %C A080580 1 -> 1101 %C A080580 1 -> 1101 %C A080580 1 -> 1101 %C A080580 0 -> 01 %C A080580 1 -> 1101 %C A080580 ... ... %C A080580 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 A080580 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 A080580 Let's relate this to the present sequence A080580: %C A080580 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 A080580 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 A080580 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 A080580 (End) %C A080580 In the Fokkink-Joshi paper, this sequence is the Cloitre (0,1,2,4)-hiccup sequence. - _Michael De Vlieger_, Jul 29 2025 %H A080580 Clark Kimberling, <a href="/A080580/b080580.txt">Table of n, a(n) for n = 1..10000</a> %H A080580 Benoit Cloitre, <a href="https://arxiv.org/abs/2506.18103">A study of a family of self-referential sequences</a>, arXiv:2506.18103 [math.GM], 2025. See p. 15. %H A080580 Benoit 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 A080580 Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="https://arxiv.org/abs/math/0305308">Numerical analogues of Aronson's sequence</a>, arXiv:math/0305308 [math.NT], 2003. %H A080580 Robbert Fokkink and Gandhar Joshi, <a href="https://arxiv.org/abs/2507.16956">On Cloitre's hiccup sequences</a>, arXiv:2507.16956 [math.CO], 2025. See pp. 3, 5. %p A080580 A080580 := proc(n) %p A080580 option remember; %p A080580 if n = 1 then %p A080580 1; %p A080580 else %p A080580 known := false ; %p A080580 for i from 1 to n-1 do %p A080580 if procname(i) = n then %p A080580 known := true; %p A080580 break; %p A080580 end if; %p A080580 end do: %p A080580 if known then %p A080580 procname(n-1)+2 ; %p A080580 else %p A080580 procname(n-1)+4 ; %p A080580 end if; %p A080580 end if; %p A080580 end proc: %p A080580 seq(A080580(n),n=1..100) ; # _R. J. Mathar_, Apr 25 2017 %t A080580 a[1] = 1; a[n_] := a[n] = If[MemberQ[Array[a, n-1], n], a[n-1]+2, a[n-1]+4 ]; %t A080580 Array[a, 60] (* _Jean-François Alcover_, Nov 23 2017 *) %Y A080580 Cf. A080455-A080458, A080036, A080037. %K A080580 nonn %O A080580 1,2 %A A080580 _N. J. A. Sloane_, Mar 23 2003 %E A080580 Edited by _N. J. A. Sloane_, Apr 27 2017