1,4

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)

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

See A249039.

(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

Cf. A249039, A249040, A287422.

Sequence in context: A082090 A060197 A116487 * A070546 A034586 A268383

Adjacent sequences: A249038 A249039 A249040 * A249042 A249043 A249044

nonn

N. J. A. Sloane, Oct 26 2014

approved