%I #34 Dec 14 2023 05:21:45
%S 1,1,4,7,7,10,13,13,16,19,19,22,25,25,28,31,31,34,37,37,40,43,43,46,
%T 49,49,52,55,55,58,61,61,64,67,67,70,73,73,76,79,79,82,85,85,88,91,91,
%U 94,97,97,100,103,103,106,109,109,112,115,115,118,121,121,124
%N a(0) = 1; for n>0, a(n) = a(n-1) if n is already in the sequence, a(n) = a(n-1) + 3 otherwise.
%H B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://www.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 B. Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://arXiv.org/abs/math.NT/0305308">Numerical analogues of Aronson's sequence</a>, arXiv:math/0305308 [math.NT], 2003.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F a(n) = 2*n-1 if n == 1 (mod 3), 2*n if n == 2 (mod 3), 2*n + 1 if n == 0 (mod 3).
%F Differences are periodic with period 3.
%F From _Colin Barker_, Jun 20 2013: (Start)
%F a(n) = a(n-1) + a(n-3) - a(n-4).
%F G.f.: (2*x^3 + 3*x^2 + 1) / ((x - 1)^2*(x^2 + x +1)). (End)
%F a(n) = 2*n + 1 - A080425(n) = 2*n - 1 + A010872(n+1). [_Wesley Ivan Hurt_, Jul 07 2013]
%t LinearRecurrence[{1, 0, 1, -1}, {1, 1, 4, 7}, 63] (* _Jean-François Alcover_, Jan 07 2019 *)
%Y Cf. A080578.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_ and Benoit Cloitre, Apr 01 2003