A081841 a(1)=0, a(n)=a(n-1)+3 if n is already in the sequence, a(n)=a(n-1)+2 otherwise.
0, 2, 4, 7, 9, 11, 14, 16, 19, 21, 24, 26, 28, 31, 33, 36, 38, 40, 43, 45, 48, 50, 52, 55, 57, 60, 62, 65, 67, 69, 72, 74, 77, 79, 81, 84, 86, 89, 91, 94, 96, 98, 101, 103, 106, 108, 110, 113, 115, 118, 120, 123, 125, 127, 130, 132, 135, 137, 139, 142, 144, 147, 149, 151
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Benoit Cloitre, A study of a family of self-referential sequences, arXiv:2506.18103 [math.GM], 2025. See p. 7.
- Robbert Fokkink and Gandhar Joshi, On Cloitre's hiccup sequences, arXiv:2507.16956 [math.CO], 2025. See pp. 3, 8.
Programs
-
Mathematica
Block[{c, k}, c[] := False; k = 0; c[0] = True; {k}~Join~Reap[Do[If[c[n], k += 3, k += 2]; c[k] = True; Sow[k], {n, 2, 120}]][[-1, 1]] ] (* _Michael De Vlieger, Jul 02 2025 *)
Formula
a(1)=0; for n>=1 a(n)=floor(r*n-(4*r-1)/(r+1)) where r=1+sqrt(2)
Comments