login
A085004
a(n)=2*A085003(n)-n.
3
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, 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, 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
OFFSET
1,2
FORMULA
|a(n+1)-a(n)| = 1. - Charles R Greathouse IV, Feb 07 2013
PROG
(PARI) 2*sum(k=1, n, (k+sqrtint(5*k^2))%4>1)-n \\ Charles R Greathouse IV, Feb 07 2013
CROSSREFS
KEYWORD
sign
AUTHOR
Benoit Cloitre, Jun 17 2003
STATUS
approved