A086377 a(1)=1; a(n)=a(n-1)+2 if n is in the sequence; a(n)=a(n-1)+2 if n and (n-1) are not in the sequence; a(n)=a(n-1)+3 if n is not in the sequence but (n-1) is in the sequence.
1, 4, 6, 8, 11, 13, 16, 18, 21, 23, 25, 28, 30, 33, 35, 37, 40, 42, 45, 47, 49, 52, 54, 57, 59, 62, 64, 66, 69, 71, 74, 76, 78, 81, 83, 86, 88, 91, 93, 95, 98, 100, 103, 105, 107, 110, 112, 115, 117, 120, 122, 124, 127, 129, 132, 134, 136, 139, 141, 144, 146, 148, 151
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Wieb Bosma, Michel Dekking, and Wolfgang Steiner, A remarkable sequence related to Pi and sqrt(2), arXiv:1710.01498 [math.NT], 2017.
- Wieb Bosma, Michel Dekking, and Wolfgang Steiner, A remarkable sequence related to Pi and sqrt(2), Integers, Electronic Journal of Combinatorial Number Theory 18A (2018), #A4.
- 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, 9, 15.
- Wolfgang Steiner, Continued fractions and S-adic sequences, Numeration systems: automata, combinatorics, dynamical systems, number theory, Univ. de Paris (France, 2021), see p. 33.
Programs
-
Magma
[Floor((1+Sqrt(2))*n-1/Sqrt(2)): n in [1..70]]; // Vincenzo Librandi, Oct 05 2017
-
Mathematica
Block[{c, k}, c[] := False; k = 1; c[1] = True; {k}~Join~Reap[Do[If[c[n], k += 2, If[c[n - 1], k += 3, k += 2]]; c[k] = True; Sow[k], {n, 2, 120}] ][[-1, 1]] ] (* _Michael De Vlieger, Jul 02 2025 *)
Comments