OFFSET
1,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Colored scatterplot of (a(n-1-a(n-1))/n, a(a(n-1))/n) for n <= 500000000 (where the hue is function of n)
FORMULA
For n > 2: a(n) = a(n-1) + A249039(n) mod 2. - Reinhard Zumkeller, Nov 11 2014
a(n) = n - a(a(n-1)) - a(n-1-a(n-1)) with a(1) = a(2) = 1. - Altug Alkan, May 01 2019
MAPLE
See A249039.
PROG
(Haskell)
a249041 n = a249041_list !! (n-1)
a249041_list = tail $ scanl (\i j -> i + mod j 2) 0 a249039_list
-- Reinhard Zumkeller, Nov 11 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 26 2014
STATUS
approved