login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A095774
a(n)=2*A003160(n)-n.
4
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, 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, -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, 2, 1, 0, 1, 0, -1, 0, 1, 2, 1, 0, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2
OFFSET
1,6
LINKS
PROG
(PARI) m=1106; v=vector(m, j, 1); for(n=3, m, g=n-v[v[n-1]]-v[v[n-2]]; v[n]=g); a(n)=2*v[n]-n
(Haskell)
a095774 n = 2 * a003160 n - n -- Reinhard Zumkeller, Aug 02 2013
CROSSREFS
Sequence in context: A175816 A227573 A085004 * A266874 A308343 A331216
KEYWORD
sign
AUTHOR
Benoit Cloitre, Jun 05 2004
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Aug 02 2013
STATUS
approved