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.
1, 5, 9, 13, 15, 19, 23, 27, 29, 33, 37, 41, 43, 47, 49, 53, 57, 61, 63, 67, 71, 75, 77, 81, 85, 89, 91, 95, 97, 101, 105, 109, 111, 115, 119, 123, 125, 129, 133, 137, 139, 143, 145, 149, 153, 157, 159, 163, 165, 169, 173, 177, 179, 183, 187, 191, 193
Offset: 1
Keywords
Links
- Clark Kimberling, 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. 15.
- Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
- Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, arXiv:math/0305308 [math.NT], 2003.
- Robbert Fokkink and Gandhar Joshi, On Cloitre's hiccup sequences, arXiv:2507.16956 [math.CO], 2025. See pp. 3, 5.
Programs
-
Maple
A080580 := proc(n) option remember; if n = 1 then 1; else known := false ; for i from 1 to n-1 do if procname(i) = n then known := true; break; end if; end do: if known then procname(n-1)+2 ; else procname(n-1)+4 ; end if; end if; end proc: seq(A080580(n),n=1..100) ; # R. J. Mathar, Apr 25 2017
-
Mathematica
a[1] = 1; a[n_] := a[n] = If[MemberQ[Array[a, n-1], n], a[n-1]+2, a[n-1]+4 ]; Array[a, 60] (* Jean-François Alcover, Nov 23 2017 *)
Extensions
Edited by N. J. A. Sloane, Apr 27 2017
Comments