login
a(1)=1; a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+4 otherwise.
4

%I #7 Mar 30 2012 18:39:12

%S 1,5,9,13,12,16,20,24,23,27,31,30,29,33,37,36,40,44,48,47,51,55,54,53,

%T 57,61,60,64,63,62,61,65,64,68,72,71,70,74,78,77,81,85,89,88,92,96,95,

%U 94,98,102,101,105,104,103,102,106,105,109,113,112,111,110,109,108,107

%N a(1)=1; a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+4 otherwise.

%C If, in the defining recurrence, the rule a(n)=a(n-1)+4 when n is not already in the sequence is generalized to a(n)=a(n-1)+k, then the resulting sequence ultimately becomes periodic with period 1,3,10,35 for k=1,2,3,4, respectively. - _John W. Layman_, Apr 15 2003

%F It appears that, for n >= 219, a(n)=n+b(n) where b(n) is the period-35 sequence (-1, 2, 5, 3, 6, 9, 7, 5, 8, 11, 9, 12, 10, 8, 6, 9, 7, 10, 13, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9, -11, -13, -10, -7, -4).

%Y Cf. A080782, A079354, A079355, A080783, A064437.

%K nonn,easy

%O 1,2

%A _Benoit Cloitre_, Feb 14 2003

%E More terms from _John W. Layman_, Apr 15 2003