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-A001511(n))) + a(n-a(n-A001511(n))) with a(1) = a(2) = 1, where A001511(n) = 1 + exponent of the highest power of 2 dividing n.
2

%I #6 Mar 23 2017 20:32:27

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

%T 19,19,20,20,21,21,21,22,23,24,25,25,26,27,28,29,28,30,31,31,32,32,33,

%U 33,34,34,34,34,35,36,37,38,38,40,40,41,42,43,43,44,45,45,46,47,47,48,48,49,51,50,50

%N a(n) = a(a(n-A001511(n))) + a(n-a(n-A001511(n))) with a(1) = a(2) = 1, where A001511(n) = 1 + exponent of the highest power of 2 dividing n.

%H Antti Karttunen, <a href="/A284006/b284006.txt">Table of n, a(n) for n = 1..10001</a>

%F a(1) = a(2) = 1, for n > 2, a(n) = a(a(A093049(n))) + a(n-a(A093049(n))).

%o (Scheme, with memoization-macro definec)

%o (definec (A284006 n) (if (<= n 2) 1 (+ (A284006 (A284006 (- n (A001511 n)))) (A284006 (- n (A284006 (- n (A001511 n))))))))

%Y Cf. A001511, A004001, A093049, A284000, A284007.

%K nonn

%O 1,3

%A _Antti Karttunen_, Mar 23 2017