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”).

a(n) = a((a(n-2))*mod(n,2)+a(n-1)*(1-mod(n,2))) + a((n - a(n-2))*mod(n,2)+(n-a(n-1))*(1-mod(n,2))).
2

%I #11 Mar 30 2012 17:34:13

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

%T 16,16,16,16,17,18,19,20,21,22,23,23,24,24,25,26,27,26,27,28,28,29,30,

%U 29,30,30,31,31,31,31,32,32,32,32,32,32,33,34,35,36,37,38,39,40,41,41,42

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

%C Let M = A005229, C = A004001. Then we may define a pair of new sequences by o1 = M*mod(n,2)+C*(1-mod(n,2)) (this sequence), o2 = C*mod(n,2)+M*(1-mod(n,2)) (A086525 - or is it A086335?).

%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>

%t digits = 200 Mc[n_Integer?Positive] := Mc[n] = Mc[( Mc[n-2])*(Mod[n, 2])+Mc[n-1]*(1-Mod[n, 2])] + Mc[(n - Mc[n-2])*(Mod[n, 2])+(n-Mc[n-1])*(1-Mod[n, 2])] Mc[1] = Mc[2] = 1 a1=Table[Mc[n], {n, 1, digits}]

%Y Cf. A005229, A086525, A086335. Different from A004001.

%K nonn

%O 1,3

%A _Roger L. Bagula_, Sep 15 2003

%E Edited by _N. J. A. Sloane_, Nov 07 2007