OFFSET
0,6
LINKS
Altug Alkan, Table of n, a(n) for n = 0..8190
PROG
(PARI) a = vector(100); print1(0", "); for(k=1, #a, print1 (a[k]=if(k==1, 1, my (n=k\2); if (k%2==0, a[2*n-1], 2*(n-a[n])))", "));
(PARI) a(n) = if(n<=1, n, if(n%2==0, a(n-1), 2*((n-1)/2-a((n-1)/2))));
CROSSREFS
KEYWORD
AUTHOR
Altug Alkan, Sep 07 2018
STATUS
approved