login
a(n)=2*A085003(n)-n.
3

%I #12 Feb 15 2013 11:54:45

%S 1,2,1,0,-1,0,1,0,-1,-2,-1,0,1,0,-1,0,1,2,1,0,1,2,3,2,1,0,1,2,1,0,-1,

%T 0,1,2,1,0,1,2,3,2,1,2,3,4,3,2,1,2,3,2,1,0,1,2,1,0,-1,0,1,2,1,0,1,2,3,

%U 2,1,0,1,2,1,0,-1,0,1,0,-1,-2,-1,0,1,0,-1,0,1,2,1,0,-1,0,1,0,-1,-2,-1,0,-1,-2,-3,-2,-1,0,-1,-2,-1,0,1,0,-1,0,1,2,1,0,-1

%N a(n)=2*A085003(n)-n.

%F |a(n+1)-a(n)| = 1. - _Charles R Greathouse IV_, Feb 07 2013

%o (PARI) 2*sum(k=1, n, (k+sqrtint(5*k^2))%4>1)-n \\ _Charles R Greathouse IV_, Feb 07 2013

%Y Cf. A083035, A083036, A083037, A083038, A085003, A085005.

%K sign

%O 1,2

%A _Benoit Cloitre_, Jun 17 2003