A081840 a(1)=0, a(n)=a(n-1)+3 if n is already in the sequence, a(n)=a(n-1)+4 otherwise.
0, 4, 8, 11, 15, 19, 23, 26, 30, 34, 37, 41, 45, 49, 52, 56, 60, 64, 67, 71, 75, 79, 82, 86, 90, 93, 97, 101, 105, 108, 112, 116, 120, 123, 127, 131, 134, 138, 142, 146, 149, 153, 157, 161, 164, 168, 172, 176, 179, 183, 187, 190, 194, 198, 202, 205, 209, 213, 217
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. 9.
- Robbert Fokkink and Gandhar Joshi, On Cloitre's hiccup sequences, arXiv:2507.16956 [math.CO], 2025. See p. 3.
Programs
-
Mathematica
Block[{c, k}, c[] := False; k = 0; c[0] = True; {k}~Join~Reap[Do[If[c[n], k += 3, k += 4]; c[k] = True; Sow[k], {n, 2, 120}]][[-1, 1]] ] (* _Michael De Vlieger, Jul 02 2025 *)
Formula
a(n) = floor(r*n-(2*r+1)/(r-1)) where r = 2+sqrt(3).
Comments