login
a(n+1) = a(n) + (a(n) mod 2)^(n mod a(n)), a(1) = 1.
2

%I #10 Jul 13 2013 12:03:11

%S 1,2,2,3,4,4,4,5,6,6,6,7,8,8,8,9,10,10,10,11,12,12,12,13,14,14,14,15,

%T 16,16,16,17,18,18,18,19,20,20,20,21,22,22,22,23,24,24,24,25,26,26,26,

%U 27,28,28,28,29,30,30,30,31,32,32,32,33,34,34,34,35,36,36,36,37,38,38

%N a(n+1) = a(n) + (a(n) mod 2)^(n mod a(n)), a(1) = 1.

%C a(n) = floor(n/4) + floor((n-1)/4) + 2 for n>1.

%H Reinhard Zumkeller, <a href="/A092038/b092038.txt">Table of n, a(n) for n = 1..10000</a>

%t Join[{1},Table[Floor[n/4]+Floor[(n-1)/4]+2,{n,2,80}]] (* _Harvey P. Dale_, Oct 03 2012 *)

%o (Haskell)

%o a092038 n = a092038_list !! (n-1)

%o a092038_list = 1 : zipWith (\u v -> v + (v `mod` 2) ^ (u `mod` v))

%o [2..] a092038_list

%o -- _Reinhard Zumkeller_, Oct 10 2012

%Y Cf. A004524.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Mar 27 2004