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 A064437 #44 Jul 30 2025 17:48:32 %S A064437 1,3,6,8,10,13,15,18,20,23,25,27,30,32,35,37,39,42,44,47,49,51,54,56, %T A064437 59,61,64,66,68,71,73,76,78,80,83,85,88,90,93,95,97,100,102,105,107, %U A064437 109,112,114,117,119,122,124,126,129,131,134,136,138,141,143,146,148,150 %N A064437 a(1)=1, a(n) = a(n-1) + 3 if n is already in the sequence, a(n) = a(n-1) + 2 otherwise. %C A064437 More generally let (x,y,z) be 3 positive integers and a(n) be the sequence a(1)=x, a(n) = a(n-1) + y if n is already in the sequence, a(n) = a(n-1) + z otherwise. Then it seems that a(n) is asymptotic to r*n where r is the largest positive root of q^2 = z*q + z - y. %C A064437 Example: (x,y,z) = (2, 1, 2) gives A004956(n), (x,y,z) = (1, 2, 3) gives A007066(n). The present sequence is the case (1, 3, 2). %C A064437 In the Fokkink-Joshi paper, this sequence is the Cloitre (0,1,3,2)-hiccup sequence. - _Michael De Vlieger_, Jul 30 2025 %H A064437 Robert Israel, <a href="/A064437/b064437.txt">Table of n, a(n) for n = 1..10000</a> %H A064437 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. 7. %H A064437 Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="https://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 A064437 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 A064437 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. 2-3, 8. %F A064437 a(n) = ceiling((1+sqrt(2))*(n-1)+C) where C = 1/(2+sqrt(2)) = 0.292893218813... %e A064437 a(6)=13 hence a(13) = a(12) + 3 = 27 + 3 = 30. %p A064437 A064437:= n -> ceil((1+sqrt(2))*(n-1)+1/(2+sqrt(2))): %p A064437 seq(A064437(n),n=1..100); # _Robert Israel_, May 19 2014 %t A064437 a[1] = 1; a[n_] := a[n] = a[n-1] + If[MemberQ[Array[a, n-1], n], 3, 2]; %t A064437 Array[a, 100] (* _Jean-François Alcover_, Aug 01 2018 *) %o A064437 (PARI) an=vector(100); an[1]=1; a(n)=if(n<0,0,an[n]); %o A064437 x=1; y=3; z=2; an[1]=x; for(n=2,100,an[n]=if(setsearch(Set(vector(n- 1,i,a(i))),n),a(n-1)+y,a(n-1)+z)); %o A064437 an %o A064437 (Haskell) %o A064437 a064437 n = a064437_list !! (n-1) %o A064437 a064437_list = 1 : f 2 [1] where %o A064437 f x zs@(z:_) = y : f (x + 1) (y : zs) where %o A064437 y = if x `elem` zs then z + 3 else z + 2 %o A064437 -- _Reinhard Zumkeller_, Sep 26 2014 %Y A064437 Cf. A004956, A007066, A026351, A079000. Apart from start, equals A080652 + 1. %K A064437 nonn %O A064437 1,2 %A A064437 _Benoit Cloitre_, Feb 14 2003